• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript-Users Digest, Vol 10, Issue 121
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 10, Issue 121


  • Subject: Re: AppleScript-Users Digest, Vol 10, Issue 121
  • From: Esa Ruoho <email@hidden>
  • Date: Fri, 05 Apr 2013 23:46:33 +0300

Hi Brian. I tried your thing, and it seemed to work in interesting ways. Opening the Downloads window was a nice idea, and I'll try and incorporate that into my setup, however, your script gave me an error - 
"System Events got an error: Access for assistive devices is disabled."

Also, all the cmd-4/ cmd-r  etc stuff is ditched if the Search-bar is selected inside iTunes.
I guess there's really no way to do this whole concept, short of figuring out how to force iTunes to stop playback and instead play a silent mp3, then going through the cmd-4/cmd-r  motions. and that would be disruptive too. hmm.
 
Message: 4 -- Date: Sat, 06 Apr 2013 00:30:51 +1100
From: Brian Christmas <email@hidden>
G'day Esa
Try this.
Regards
Santa

# Your part modified
tell application "iTunes"
        activate
        tell application "Finder"
                repeat until exists process "iTunes"
                        delay 0.1
                end repeat
                delay 0.1
                set theEnabled to exists window "iTunes"
                tell application "System Events" to tell process "iTunes"
                        if not theEnabled then keystroke "1" using {option down, command down}
                        try
                                keystroke "7" using command down
                        end try
                        delay 1
                        keystroke "r" using command down
                end tell
        end tell
end tell
# My part
tell application "iTunes"
        activate
        delay 20 # Give update window plenty of time to show
        tell application "Finder"
                tell application "System Events" to tell process "iTunes"
                        keystroke "4" using {option down, command down} # opens downloads window, not necessary, just nice to see it
                        tell window "iTunes"
                                set buttonCount to (count of (buttons of UI element 1 of splitter group 1)) - 1
                                say buttonCount & " items to update." as text
                        end tell
                        repeat with eachButton from 1 to buttonCount
                                click button eachButton of UI element 1 of splitter group 1 of window "iTunes"
                                click
                                delay 1
                        end repeat
                end tell
        end tell
end tell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: INDESIGN: Duplicating Char Style from One Doc to Another
  • Next by Date: Re: Script to force iTunes'11 to start and check for App updates
  • Previous by thread: Re: INDESIGN: Duplicating Char Style from One Doc to Another
  • Next by thread: New to Applescript
  • Index(es):
    • Date
    • Thread