• 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: Script to force iTunes'11 to start and check for App updates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to force iTunes'11 to start and check for App updates


  • Subject: Re: Script to force iTunes'11 to start and check for App updates
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 06 Apr 2013 08:39:01 +1100

Try this Esa. However, you might need to program to put in your iTunes password to check for updates.

Regards

Santa

on run
tell application "System Events"
if not UI elements enabled then
display dialog "Enable Access for assistive devices (found in the Universal Access System Preference) must be on for this software to correctly work. This program will enable this setting for you" giving up after 5
set UI elements enabled to true
display dialog "Access for assistive devices in now on" giving up after 5
end if
end tell
# 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
tell application "Finder"
tell application "System Events" to tell process "iTunes"
set flag to true
set x to 0
delay 2
repeat until exists UI element 1 of splitter group 1 of window "iTunes"
set x to x + 1
if x = 300 then # only wait 30 seconds maximum
set flag to false
exit repeat
end if
delay 0.1
end repeat
delay 0.4
if flag then
keystroke "4" using {option down, command down} # opens downloads window
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
else
say "Updates Window did not open"
end if
end tell
end tell
end tell
end run






 _______________________________________________
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

References: 
 >Script to force iTunes'11 to start and check for App updates (From: Esa Ruoho <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 10, Issue 121
  • Next by Date: Re: INDESIGN: Duplicating Char Style from One Doc to Another
  • Previous by thread: Re: Script to force iTunes'11 to start and check for App updates
  • Next by thread: Re: Script to force iTunes'11 to start and check for App updates
  • Index(es):
    • Date
    • Thread