Help needed: Automator app to turn on App Store updates

Joined
Jan 7, 2014
Messages
1
Reaction score
0
I created an Automator app to turn on App Store updates; I then created a Calendar event to run the app at 2am every night. (I also created a second app to turn off the App Store updates, which I have set to run at 5am.) That way App Store updates will only run at night, when it doesn't count against my Internet bandwidth limit.

When I test the app inside Automator, it works perfectly. But when my calendar tries to launch the app, I get an error that says "The Action 'Watch Me Do - click App Store)' encountered an error." The same error occurs if I double-click on the app from Finder. (A similar error occurs with the second app.)

If anyone could help me troubleshoot, I'd appreciate it. I'm running Maverick, OS X 10.9.1.

Here is a link to my Automator app:
https://www.dropbox.com/s/ughpx7c9wue3ila/Turn on App Store Updates.app.zip

Here is a screen capture of what I see when I run it within Automator, in case that helps you point out what I'm doing wrong. Thanks!

upload_2014-1-7_7-57-51.png
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
I would imagine it's the fact that that panel requires an admin password.

you are probably better off dropping down to AppleScript and Shell.

change this to meet your needs
Code:
try
if (do shell script "softwareupdate -l") contains "*" then
do shell script "/usr/sbin/softwareupdate -i -a & >/dev/null 2>&1" password "myadminpassword" with administrator privileges
set question to display dialog "Some update has been installed. Please restart your computer" buttons {"Restart later", "Restart Now"} default button 2
set answer to button returned of question
if answer is equal to "Restart Now" then
tell application "loginwindow"
«event aevtrrst»
end tell
end if
end if
end try
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top