Re: applescripting the calculator
Re: applescripting the calculator
- Subject: Re: applescripting the calculator
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 25 Jan 2007 11:41:00 +0100
Le 24 janv. 07 à 22:46:56, Adam Bell a écrit : This works for me:
tell application "System Events" to tell process "Calculator" activate 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} set x to (the clipboard) as number end tell
Thanks
I must write that it doesn't work on my machine.
The tell group 1 of window 1 … end tell block works flawlessly (the calculator correctly displays 14).
It's the instruction keystroke "c" using {command down} which doesn't do its job and leave the clipboard to its entry content. Is it necessary to set the focus on the result ?
Yvan KOENIG
|
_______________________________________________
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