Reply to comment


Well, the way the script is written now there does have to be a global boolean variable, in this case okflag. It could just as easily be written as something like

tell application "System Events"
        if process "iTunes" exists then
                tell application "iTunes"
                        set currentvolume to the sound volume
                        if comment of current track is "Proximity Paused" then
                                set comment of current track to ""
                                repeat with j from 0 to currentvolume by 2 --try by 4 on slower Macs
                                        set the sound volume to j
                                end repeat
                        end if
                end tell
                tell application front_app
                end tell
        on error
        end try
  end if
end tell

This exact code doesn't work for me though. So i put okflag there as a global variable so that it can be accessed throughout the script and not redefined in different places.


The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img>
  • Lines and paragraphs break automatically.