I'm trying to change the iTunes player state from within a script. Reason being that setting the state to pause when it is paused starts it playing.
I can change the state from a script, but it only changes the icon and doesn't stop iTunes if it is playing.
I suspect I will need some sort of Capi shizzle??
Any ideas or help would be much appreciated.
Cheers
J
I can change the state from a script, but it only changes the icon and doesn't stop iTunes if it is playing.
I suspect I will need some sort of Capi shizzle??
Any ideas or help would be much appreciated.
Cheers
J
Code:
sub main (ByVal jwdeviceid As string) 'iTunes player state device id is 7 'device value 4 is playing 'device value 3 is paused dim dimlevel dimlevel = hs.devicevalue (jwdeviceid) if dimlevel = 4 then dimlevel = 3 hs.SetDeviceValuebyref(jwdeviceid, dimlevel, true) hs.WriteLog("JW", "iTunes set to Paused Variables are : iTunes device - " & jwdeviceid & " : iTunes device state code - " & dimlevel) else dimlevel = 3 hs.SetDeviceValuebyref(jwdeviceid, dimlevel, true) hs.WriteLog("JW", "iTunes wasn't playing Variables are : iTunes device - " & jwdeviceid & " : iTunes device state code - " & dimlevel) end if End Sub
Comment