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




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:
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: 
 >applescripting the calculator (From: Gordon Beckhart <email@hidden>)
 >Re: applescripting the calculator (From: Adam Bell <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.