Mouse position doesn't seem to restore as expected

Thanks for BTT - I'd be much less productive without it.

I'm trying to make a keyboard shortcut to toggle Voice Control to Sleep/Wake up.

I'm having trouble restoring the mouse to it's original position.
On the first call all seems well, but then the restored position goes wrong.
It seems as if a second call to "If Image Visible on Screen" overwrites the position saved by "Save Current Mouse Position".

I'm attaching the exported triggers - hope this will enable you to see the problem.

I also tried to use "Move Mouse to Position", but found I could only enter fixed values in the X & Y fields, not names of variables, if I put in a variable name the x/y field reverts to zero.

Affected input device Keyboard & Mouse

Device information:
Macbook Pro (late 2015)
OS-X Monterey Ver12.7.4
BTT Version 5.280
SleepWake_exported_triggers.bttpreset (23.1 KB)

Additional information (e.g. crash logs, related issues, etc.):

Little help ??

I've imported your export, but I'm not sure what exactly should happen since I'm not sure where this searched image is being shown. Looking at the actions I've noticed 2 things:

  • you are not saving the mouse position to a var, but in the last action you are trying to restore it to - (saved_mouse_position_x,saved_mouse_position_y), but I believe you just need to leave it empty.
  • you have 2 "End IF condition" - not sure if this would cause any issues