Re: Watch Me Do cannot select System Preferences form Apple Menu
Re: Watch Me Do cannot select System Preferences form Apple Menu
- Subject: Re: Watch Me Do cannot select System Preferences form Apple Menu
- From: John Stewart <email@hidden>
- Date: Thu, 01 Nov 2012 04:48:25 -0400
On Oct 31, 2012, at 7:29 PM, Mark F West <email@hidden> wrote:
> Excellent
Not really, I had a couple of sloppy practices in it, here's a better version.
(*
Name: SystemPreferences
Version: 1.1
Compile Date: Thursday, November 1, 2012
Compile Time: 4:43:54 AM
Copyright © 2012 - 2013 John B. Stewart
Applications Used: System Preferences.app
Scripting Additions used: StandardAdditions.osax
*)
tell application "System Preferences"
set foo to name of every pane --reveal pane "Software Update"
set bar to my getChoice(foo) as text
activate
reveal pane bar
end tell
on getChoice(foo)
tell current application to choose from list foo with title "Preferences" with prompt "Choose:" without multiple selections allowed
set bar to (item 1 of result as text) -- modified
if bar is false then
tell application "System Preferences" to quit
error number -128
else
return bar -- modified
end if
end getChoice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden