Move Mouse Position: Keep X, Y Position

At present, moving the mouse requires a new absolute or relative coordinate. In my use case, I only need to move one coordinate. I would like to be able to store an X or Y value so that I can return to this position.

Use case: Pro Tools has what is called "Dynamic Transport" that allows quick playback with just a click, but it requires clicking at a very specific location with little pixel height and is inconvenient for me. I would like to make a macro to move my cursor from my present "click" coordinates to the desired Y position, execute a left-click, and then return to the original Y position.

If it’s about returning to the previous position, there is a “Save Current Mouse Position” action and a “Restore Saved Mouse Position”. If you really need to change only one direction absolutely, then you can definitely do it with the “Run Real JavaScript” trigger, see Using Java Script (not JXA) · GitBook and in particular the example for “trigger_action” which actually is about moving the mouse. You can get the current mouse position via

let mouse_x = await get_number_variable({variable_name:'mouse_position_x'});

and then modify it according to your needs before sending it back to BTT as in the example.

the „move mouse to position“ action allows you to use the current mouse position as anchor, then you can easily adjust x/y