wats wrong with this code that turns the playlist shuffle on?
on mouse down theObject event theEvent
set image of image view 9 of window 0 to load image "d_shuffle"
end mouse down
on mouse up theObject event theEvent
tell application "iTunes"
set player to shuffle of playlist
if player is true then
set player to false
else
set player to true
end if
end tell
set image of image view 9 of window 0 to load image "shuffle"
end mouse up
if the name of theObject is "shufflebutton" then
tell application "iTunes"
if shuffle of view of browser window 1 is equal to false then
set shuffle of view of browser window 1 to true
else
set shuffle of view of browser window 1 to false
end if
end tell
end if
there might be a way to shorten that but at least it works
i knew you could use the get(not shuffle), i tried this before posting my response but it wouldn’t work in regular ScriptEditor, so i posted my crappier version
Unfortunately both solutions dont work for me (I pasted them into Script Editor, on the first i get the error “The variable theObject is not defined.”, on the second i get nothing, no shuffle and no error.).
Maybe I’m doing something very wrong here, so please tell me what I could have done different.
And to clear things out: I got an application for my gamepad, which can execute scripts with one button pushed; in the moment im trying to get my gamepad into a remote control, which also should work when itunes isnt active.