link to external url

Posted on
Sun Jan 20, 2013 4:11 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

link to external url

i have control page button to toggle my projector on and off.

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?

Late 2018 mini 10.14

Posted on
Sun Jan 20, 2013 4:17 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: link to external url

Hi Mat,

Unfortunately, no. Those URL click actions are client-side only, so the server cannot run any type of script or conditional before it occurs. There are server side actions as well, but those are handled differently and independently from the URL or control page navigation actions.

Image

Posted on
Sun Jan 20, 2013 7:42 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: link to external url

Thanks for the quick reply Matt.

No worries, its only the press of a button on the iPad, was just trying to make it slicker.

Cheers

Mat

Late 2018 mini 10.14

Posted on
Thu Feb 14, 2013 11:11 am
axlbundy offline
Posts: 22
Joined: Jul 27, 2012

Re: link to external url

mat wrote:
(i need a "link to external url" to start plex on the ipad here)


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).



Sorry to hop into this thread but I'm currently working on my control pages and I've been able to create external URLs for certain apps (Remote, Plex, etc) but I do not know how to find the addresses to use for all the apps that I want to create shortcuts to. For example the Sirius XM app. Can you help me figure this out? There are probably 10 different apps that I need urls for.

Thanks

Joe

Posted on
Fri Feb 15, 2013 7:50 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: link to external url

Hi Joe,

The site handleOpenUrl has a database, but it looks like the Sirius app isn't in there. Note the application has to add support for handling the openUrl command, so it is possible the Sirius app doesn't have that implemented.

Image

Posted on
Thu Feb 21, 2013 12:58 pm
axlbundy offline
Posts: 22
Joined: Jul 27, 2012

Re: link to external url

Bummer about the Sirius app, but thanks for the link. I'll have to cross reference it with my installed apps.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 30 guests