Put Mouse back in start position after macro?
Hey @Kitch @chrscheuer
Wondering if it's possible to recall the starting mouse position at the end of a macro that uses mouse clicks around the screen. I thought "Get Mouse Position" would be the way, but can't figure out how to recall at the end. Possible?
Kitch Membery @Kitch2022-01-31 20:18:40.739ZThis is how you can do it:-)
//Get mouse Position const oldMousePosition = sf.mouse.getPosition().position; // Add your script here //Set mouse postion sf.mouse.setPosition({ position: { x: oldMousePosition.x, y: oldMousePosition.y } });Rock on!
Brett Ryan Stewart @Brett_Ryan_StewartThanks @Kitch ! So is it possible to implement this with a command that uses macros or can I only use it if I convert to script?
Kitch Membery @Kitch2022-01-31 20:46:20.645ZYou can also do this with Macros.
-
Create a "Get Mouse Position" macro action
-
Then add the macro that you want to add
-
Create a "Set Mouse Position" macro action
Then drag the "position" value from the "Get Mouse Position" macro to the "Position" property of the "Set Mouse Position", like this;

Brett Ryan Stewart @Brett_Ryan_Stewart@Kitch That did it, thanks!!!
@chrscheuer Yea it wasn't working for me. Does now though using the drag position button :-)
Kitch Membery @Kitch2022-01-31 23:29:33.118ZAwesome!
-
In reply toBrett_Ryan_Stewart⬆:Christian Scheuer @chrscheuer2022-01-31 22:52:59.617ZHi Brett,
The way Kitch described it with scripts & macros would be the way to implement this manually.
That being said, each individual SF action that moves the mouse should itself make sure to put it back where it was immediately. So you shouldn't normally need to think about this. Is there a specific scenario where you found this wasn't the case since you asked?