• 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: applescripting the calculator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescripting the calculator


  • Subject: Re: applescripting the calculator
  • From: Adam Bell <email@hidden>
  • Date: Thu, 25 Jan 2007 20:40:56 -0400

Turns out to be very flaky all around, I guess - I have to put "as real" to get it to work and if your processor is busy, it will bomb on one of the button clicks - did it to me on "plus" a bunch of times and then started working again.

Adam

At 7:18 PM -0500 1/25/07, tom wible wrote:
didn't work if calculator wasn't already running, then it bombed on the activate, then it bombed on the 'as number' inside the finder tell...

this works:

tell application "Calculator" to activate
tell application "System Events" to tell process "Calculator"
	tell group 1 of window 1
		click button "Clear"
		click button "9"
		click button "plus"
		click button "5"
		click button "Equals"
	end tell
	keystroke "c" using {command down}
end tell
set x to (the clipboard) as number
_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Re: applescripting the calculator (From: tom wible <email@hidden>)

  • Prev by Date: Re: applescripting the calculator
  • Next by Date: Re: applescripting the calculator
  • Previous by thread: Re: applescripting the calculator
  • Next by thread: Re: applescripting the calculator
  • Index(es):
    • Date
    • Thread