• 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: OT: Applescript help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Applescript help


  • Subject: Re: OT: Applescript help
  • From: "Jason T. Slack" <email@hidden>
  • Date: Thu, 9 Feb 2006 20:25:33 -0500

Mark,

On both yours and mine, I get the following error:

System Events got an error: NSReceiverEvaluationScriptError: 4

It highlights the click button line

I am on 10.4.4 on both a G5 and an intel iMac.

Anymore thoughts?

-Jason
On Feb 9, 2006, at 8:19 PM, Mark Lively wrote:

On 2/9/06, Jason T. Slack <email@hidden> wrote:
How can I tell AppleScript to click a button?

I have the following snippet:

tell application "System Preferences"
        activate
        set current pane to pane "com.apple.preference.energysaver"

        tell application "System Events"
                tell process "System Preferences"
                        tell window "Energy Saver"

set theButton to the button "Schedule..."
click theButton


                        end tell
                end tell
        end tell
end tell

But it does not like the set theButton Line.

Any thoughts?

the following works for me

tell application "System Events"
	tell process "System Preferences"
		click button "Schedule..." of window "energy saver"
	end tell
end tell

Yours works as well.

10.4.4 here.  Not sure why it wouldn't work.

-Mark
NO CARRIER

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: OT: Applescript help
      • From: Mark Lively <email@hidden>
    • Re: OT: Applescript help
      • From: Chris Espinosa <email@hidden>
References: 
 >OT: Applescript help (From: "Jason T. Slack" <email@hidden>)
 >Re: OT: Applescript help (From: Mark Lively <email@hidden>)

  • Prev by Date: Re: gcc4.0, char_traits termplate specialization error
  • Next by Date: Re: OT: Applescript help
  • Previous by thread: Re: OT: Applescript help
  • Next by thread: Re: OT: Applescript help
  • Index(es):
    • Date
    • Thread