Move and Resize Window TOGGLE (Catalina Sidecar)?

With the introduction of Sidecar for macOS Catalina, I want to create a macro that will move an open Photoshop (document) window to my iPad and resize it to the full screen of the iPad Pro.

This is very easy to accomplish with the "Move and Resize window" command.

What I am looking to do is create a toggle (if/then/else) that would switch it back and forth from the main screen to the iPad with a single command key.

I am not sure on how to set up the variables to check to see if the document/window is on the external monitor or the main monitor so I can toggle to the correct one.

I currently have two macros to make this work, here is just the to-the-ipad version (other just goes to main):

Any ideas on how to make this one macro? Thanks!!!!

Use the WINDOW function and compare it to the SCREENVISIBLE function result. Something like:

  • If SCREENVISIBLE(Back,Left) <= WINDOW(1,Left) AND WINDOW(1,Left) <= SCREENVISIBLE(Back,Right) then
    • Move to main screen
  • else
    • Move to iPad screen

the “Back” screen is the screen that does not currently have the front window, so your current macro should be toggling back and forth between monitors anyway, but you may want to use Main and External or Second for clarity if you want different placement when it is on the Main screen to when it is on the iPad screen.

1 Like

How do I insert the windows function into the "if then else" action... looking for the correct condition or is this through a script?

"

Maybe I figured it out where to place the code you gave me... I use the "Calculation" condition in and enter

SCREENVISIBLE(Back,Left) <= WINDOW(1,Left) AND WINDOW(1,Left) <= SCREENVISIBLE(Back,Right)

1 Like