- Code: Select all
tell application "IndigoServer"
if value of variable "CINEMAOFFSAFE" = "YES" then
if value of variable "cinemamode" = "on" then
execute trigger action "Cinema mode off"
set value of variable "cinemamode" to "off"
else
execute trigger action "Cinema mode on"
set value of variable "cinemamode" to "on"
(i need a "link to external url" to start plex on the ipad here)
end if
else
execute trigger action "Projector warning"
end if
end tell
which runs perfectly and checks not to power off if the projector has only been on for a short period of time to save the bulb.
in the "link to external url" I use "plexapp://" to start plex on the iso device that the projector was trigger from. The only issue is, as the button on the control page is a toggle, when i switch the projector off again, plex launches again (as it should because at present the external link is triggered again).
Is there a way to include the "link to external url" within applescript, so that I can make plex launch only when the projector is turned on - ie where noted conditionally in the script above?
I've searched but to no avail. Any suggestions please?