Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescripting the calculator



This does not answer the question, however there is an excellent example of an applescript calculator at the XCode web-site that uses a variety of applescripts to operate.  
It does not contain information about its source, however I will put a copy of the files at my web site so you can have a look.

http://idisk.mac.com/peterba1/?view=web

Peter


On 26/01/2007, at 11:18 AM, 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:

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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.