I'm working on a script that when i run it, it will turn the volume down on itunes, but only if itunes is running. My macbook does this weird thing that if a program isn't running and you tell it to do something in applescript it freaks out. This is what i have so far:
if application "iTunes" is (open) then
tell application "iTunes"
set the sound volume to 50
end tell
end if
That should work, but for some reason it doesn't. It says "No result was returned from some part of this expression." Could anybody help me out with this?
if application "iTunes" is (open) then
tell application "iTunes"
set the sound volume to 50
end tell
end if
That should work, but for some reason it doesn't. It says "No result was returned from some part of this expression." Could anybody help me out with this?