Itunes In Applescript

Joined
Dec 7, 2010
Messages
1
Reaction score
0
Points
1
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?
 
Joined
Dec 26, 2010
Messages
3
Reaction score
0
Points
1
try this


repeat
if app "itunes" is running then
tell app "itunes"
set sound volume to 50
end tell
else
tell app "itunes"
run
delay 13
set sound volume to 50
end tell
end if
end repeat


that'll make itunes run if it isnt running
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top