• 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: set optionKeyDown to...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set optionKeyDown to...


  • Subject: Re: set optionKeyDown to...
  • From: julifos <email@hidden>
  • Date: Fri, 12 Sep 2008 22:48:03 +0200
  • Thread-topic: set optionKeyDown to...

>
> But I think that is beyond my capabilities for now.

Just in case you wanna increase your capabilities, just follow these steps:

http://lists.apple.com/archives/applescript-studio/2007/May/msg00168.html

I did it in a couple of minutes (read + copy/paste) and then I run this with
success from my external script (after building the test app):

tell application "Untitled"
    set OptionDown to call method "isOptionKeyDown" of class "NSEvent"
end tell

--> will return integer 0 for false, 1 for true

The only difference with the original explanation is in the step 4 (maybe
due to the different Xcode versions): to add the Carbon framework I
right-clicked the "Frameworks" folder, then choose "Existing frameworks...",
then select manually "Carbon.framework".

Cheers and good luck!


jj

--> BTW, if you convert your script into a AS-Studio app, it will be much
more easy to use the method without the overhead of launching a different
app to do the task (just in case you're building an app and not a compiled
script)
---> Seems the obj-c code adds support as well for command, control and
shift keys.


 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: set optionKeyDown to...
      • From: Robert Poland <email@hidden>
References: 
 >Re: set optionKeyDown to... (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: If Statements
  • Next by Date: Re: Consternation resulting from trying to use Apple Mail as a Gmail IMAP Client
  • Previous by thread: Re: set optionKeyDown to...
  • Next by thread: Re: set optionKeyDown to...
  • Index(es):
    • Date
    • Thread