For demonstration purposes, I'm gonna use iTunes as an example. Sorry for the lengthy code, but I just added a few lines so that the variable is created for you in Indigo for easier debugging.
- Code: Select all
tell application "iTunes"
set iTunesPlaylistRepeat to song repeat of current playlist as string
end tell
tell application "IndigoServer"
if not (variable "iTunesPlaylistRepeat" exists) then
make new variable with properties {name:"iTunesPlaylistRepeat", value:iTunesPlaylistRepeat}
else
if value of variable "iTunesPlaylistRepeat" is not iTunesPlaylistRepeat then
set value of variable "iTunesPlaylistRepeat" to iTunesPlaylistRepeat
end if
end if
end tell
Now when I run this in AppleScript Editor (I'm on Snow Leopard), it creates/updates the variable just fine in Indigo with the value "all". However if Indigo executes this script, it fills it in with "«constant ****kAll»". Obviously it's the constant and not the string value. Any ideas as to why?
I'm running the latest beta of Indigo.
Thanks!