Rdio Help

Posted on
Tue Nov 13, 2012 10:38 pm
thedon offline
Posts: 246
Joined: Apr 01, 2011

Rdio Help

Hello, really enjoying doing EVERYTHING from Indigo!
My big question is how do I get a response back from App Rdio via Apple Script
I can control play and pause etc already and works well via apple script, but how do I put a apple script response in a control page.
This is the command (which works) "tell application "Rdio" to get the name of the current track"
How so I get the response to show in a control page.

Thanks

Posted on
Wed Nov 14, 2012 4:35 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Rdio Help

I don't know any thing about Rdio or it's AppleScript dictionary, but assuming the script is running on the same Mac as the Indigo server software and that you can assign the information you're gathering from Rdio to an AppleScript variable, you can assign the value of that AppleScript variable to an Indigo variables which can, in turn, be displayed on control pages. First, create a variable in Indigo, perhaps naming it "RdioStatus". Then modify your AppleScript to take the data from Rdio and assign it to an AppleScript variable. This is usually done with something like
Code: Select all
set myAppleScriptVariable to <something obtained from an application>
(where <something obtained from an application> is, well, something you obtained from an application, like the current channel or station name). Then add
Code: Select all
tell application "IndigoServer"
    set value of variable "RdioStatus" to myAppleScriptVariable as text
end tell

to your AppleScript to assign that value to the Indigo variable.

Posted on
Wed Nov 14, 2012 10:36 am
thedon offline
Posts: 246
Joined: Apr 01, 2011

Re: Rdio Help

I guess that's my question, how do I create a Apple Script variable in Indigo? I only get ones created by plugins right now.

And yes Indigo and Rdio are on the same machine and apple script performs properly.

Posted on
Wed Nov 14, 2012 10:47 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Rdio Help

You can create variables in Indigo that are accessible through AppleScript (as is the case with the AppleScript I posted). In Indigo, you simply open the Variables window from the Window menu and click the "New" button. You can name the variable anything you like (as long as there aren't spaces in the name). Check out the Indigo 6 Overview in the documentation (These are the docs for Indigo 5).

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 14 guests