• 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: 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

References: 
 >applescripting the calculator (From: Gordon Beckhart <email@hidden>)
 >Re: applescripting the calculator (From: Adam Bell <email@hidden>)

  • Prev by Date: Size of a list box
  • Next by Date: Re: Size of a list box
  • Previous by thread: Re: applescripting the calculator
  • Next by thread: Re: applescripting the calculator
  • Index(es):
    • Date
    • Thread