ive had Indigo for a while but since I've got a rfxcom I've seriously got into indigo.
Right now I'm just trying to get a little bit of spotify integration, which is working a bit.
But I'm trying to fill a variable with the state of spotify: playing or paused.
I've think I've got it with a applescript, but I'm getting an error:
ell application "IndigoServer"
exists variable «constant ****kPSP»
--> error number -10001
Result:
error "IndigoServer got an error: Er heeft zich een descriptor type mismatch voorgedaan." number -10001 to item (sorry dutch language)
does anyone know what to do?
here is my code
- Code: Select all
----
property spotifystate : ""
----
if spotifystate = "" then
tell application "Spotify"
if player state is paused then play
set spotifystate to playing
tell application "IndigoServer"
if not (variable spotifystate exists) then ¬
make new variable with properties {name:spotifystate, value:playing}
if playing is not equal to (value of variable spotifystate) then
set value of variable spotifystate to playing
else
tell application "Spotify" to pause
set spotifystate to paused
tell application "IndigoServer"
if not (variable spotifystate exists) then ¬
make new variable with properties {name:spotifystate, value:paused}
if paused is not equal to (value of variable spotifystate) then
set value of variable spotifystate to paused
end if
end tell
end if
end tell
end tell
end if
i hope I'm in he right direction. At least the functions for spotify work, it just that i want the value into a variable n indigo
thanks for the help!
HenkJan