I have four macros that move window to top left, top right, bottom left, bottom right. Each of them works fine. I wanted to add new shortcut to cycle through those 4 when processed the shortcut key continuously. Screenshot attached. All 5 macros are imported and attached as well.
It almost worked, except that when the window is at top right, it doesn't move to bottom left according to the switch logic. Can anyone help me check what's wrong with the macro? Thank you!
Can't help you without having Macro "3. 1/4 bottom left".
However, you can easily help yourself.
First use the Macro Debugger to step through your macro and make sure it is switching as you expect.
Second, trigger the Macro 3 indepently and make sure it moves the window as expected.
EDIT:
Two more thoughts:
What is purpose of the "ROUND" function in your Set Variable "v1" to "v3" ?
Try using the "is" operator instead of the "contains" operator in the Switch Cases.
As @JMichaelTX suggests, add Debugger Breakpoint This Macro action before the Switch action and use the Value Inspector to inspect the value of the WinFrame and v1,v2,v3 variables.
I would guess that the values of v1,v2,v3 do not match the result of winFrame and that needs to be resolved for your macro to work properly.
That's what I thought too, starts with is part of contains. However I tested multiple times without any other change, starts with works while contains doesn't work (doesn't move to bottom left), how weird this is.
Ah. That's actually kind of funny. I see why it is failing for you. I tried it out, and the first press works, and the second press works, but then it gets stuck and the top right, and so I logged the value of WinFrame, v1, v2, v3 and get: