Set Variable to Mouse position

Where did this item go? I use it to return to a document place after execution of a macro. I can not find it any more in the list of "set variable to ........"

Thanks.

it's a token, %CurrentMouse%
also in the action 'move or click mouse' under the settings gear on the upper right there is a 'return mouse location' that can be checked or unchecked.
hope that helps.

Hi @pastorbob12, it's exactly like it answered @troy.

2019_01_13%20Support%20

Here is what I tried
Set variable to text %CurrentMouse%

Variable name =returnmouse

No error messages when it runs

I don’t know how to check to see the value of the variable to verify it was set.

Use variable return mouse to set the mouse current location.

The mouse doesn’t move back to where return mouse was supposedly set

Thanks for your help

What am I missing

Bob Akins

rakins2@mac.com

To see the value of a variable;
Go to keyboard maestro preferences and select variables. There is a search box on the bottom left.
I would suggest;
Create a test macro, first action would be a 3 second pause, then the set variable action.
Run the macro, move the mouse to a position on the screen, then check the variable value. Run the macro again, move the mouse to a different position on the screen, then check the variable value and that it is different than the first run.

I am purposefully away from a computer for 4 days so I cannot be of help with posting a macro for you or looking at your macro if you should post it.

If you are still having problems, post your macro here on the forum and I’m sure one of the many helpful souls will help you solve your issue.

Thank you for your help.

I also found out that I can set variable to calculation. Mousex(), MouseY()

Then use variable to re position the mouse after the macro completes.

Bob Akins

rakins2@mac.com

Thanks for your help. It was a help to be able to check the value of a variable

I also discovered I could “set variable return mouse to Calculation MouseX, MouseY

Then use variable to reposition mouse at macro exit.

Thank you very much for the leads
Bob Akins

rakins2@mac.com