i want to put into a variable a 0/1 entry based on wether a laptop is roaming (ie not connected to an external screen) or at home connected to external screens. I can also live with a non variable solution based on if then (taking into account screens connected).
Anyone has suggestions of a quick way to do so?
Or equivalently, for an Execute Applescript action:
use AppleScript version "2.4"
use framework "Foundation"
use framework "Appkit"
use scripting additions
if 1 < length of (current application's NSScreen's screens as list) then
1
else
0
end if