I need a conditional if there are two monitors

I cannot find a KM conditional that will check if I have dual screens or not. I am now using my laptop with an extra desktop monitor (dual screens). When I take my laptop somewhere, my macros need to still work correctly. That is, they still “work”, but not correctly. My desktop screen is a 24" monitor rotated to vertical. I use an applescript to move and size some of my macro launched windows to fit that screen.

I wish there was as way to escape this part of the macro - IF - I had two screens showing when KM is triggered. Ideas? Thanks

Q: Is there a variable for environment (The environmental variable “??”) that would show if I am using two monitors?

This LINK goes a little farther into linux/terminal than I completely understand but it does suggest that there may be a way to do this.

set variable to calculation
SCREENCOUNT()
use the variable in conditional

Thanks, I will give this a shot.

Thanks. I was not aware of this function.

For those like me, see:

Functions [Keyboard Maestro Wiki]

And, from the KM Editor Menu:

1 Like

And if you want to get from Keyboard Maestro directly to the wiki help, hold the option key down while selecting the function from the menu:

2 Likes

Very cool and helpful! :sunglasses: