Can I move mouse position dynamically?

Hi All,

BTT allows me to move mouse position to a predefined location. I am not sure if it is possible to pass a new position as a parameter of the move-mouse-position function, so that I can calculate a new position and call the function?


Here is an example that uses the "Real Java Script" action to move the mouse:

(async ()=> {

// you can get the correct properties by copying a configured trigger in BTT (cmd+c) and pasting it in some text editor
let actionDefinition = {
  "BTTPredefinedActionType" : 153, 
  "BTTPredefinedActionName" : "Move Mouse To Position",  // the name is optional
  "BTTMoveMouseToPosition" : "{100, 100}", 
  "BTTMoveMouseRelative" : "6" // 6 is relative to mouse cursor

let result = await callBTT('trigger_action', {json: JSON.stringify(actionDefinition)});