Re: applescripting the calculator
Re: applescripting the calculator
- Subject: Re: applescripting the calculator
- From: Adam Bell <email@hidden>
- Date: Wed, 24 Jan 2007 17:46:56 -0400
Title: Re: applescripting the
calculator
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
At 2:19 PM -0500 1/24/07, Gordon Beckhart wrote:
dear friends
Been tring to teach my self applescript
and this bit with the calculator has me frustrated.
The command "exists" seems to
work and returns me a "true". Trying to click, press
the number buttons just returns an error message.
this is the applescript, can anyone
suggest how to make it function?
thanks
Gordon Beckhart
tell application
"Calculator"
tell application "System Events"
tell application process "calculator"
tell window
"calculator"
exists
button "9" of group
1
--exists
button "Clear" of group 1
--click
button "9" of group 1
--press
button "plus" of group 1
--press
button "5" of group 1
--press
button "equals" of group 1
end
tell
end
tell
end tell
end tell
s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net
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