I want to put an expression in a growl notification (it’s my first script…) and I don’t know how to do this, or if it is possible; is it possible? Here’s The script:
tell application "iTunes"
set thetitle to (name of current track)
tell application "GrowlHelperApp"
set the allNotificationsList to ¬
{"Script Started"}
set the enabledNotificationsList to ¬
{"Script Started"}
register as application ¬
"iTunes" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "iTunes"
notify with name ¬
"Script Started" title ¬
"Script Started" description ¬
"??" application name "iTunes"
end tell
tell application "iTunes"
if player state is paused then
tell application "SystemUIServer" to set volume 3.5
play
set the sound volume to 77
set thetitle to (name of current track)
say thetitle
say "is playing"
if thetitle is "Hey Ya!" then
tell application "Firefox" to OpenURL "http://www.urbandictionary.com/define.php?term=Hey+Ya"
tell application "System Events"
set visible of process "iTunes" to false
end tell
end if
else
pause
set thetitle to (name of current track)
if thetitle is "" then
say "No Track Selected"
else
say thetitle
say "is paused"
tell application "iTunes"
end tell
end if
tell application "System Events"
set visible of process "iTunes" to false
end tell
end if
end tell
end tell
(yesh, i know it’s weird, but I just want to learn some applescript :))
Model: iMac & Powerbook
Browser: Opera/9.00 (Macintosh; PPC Mac OS X; U; en)
Operating System: Mac OS X (10.4)