• 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: Detecting a keydown or key up.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting a keydown or key up.


  • Subject: Re: Detecting a keydown or key up.
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 04 Aug 2011 09:00:03 +1000
  • Thread-topic: Detecting a keydown or key up.

On 4/8/11 4:52 AM, "Luther Fuller" <email@hidden> wrote:

> I've looked everywhere I know to look, and can find no documentation on:
> 1. NSAlternateKeyMask and
> 2. current application
> Where else should I look?

Starting with 2:

When you script an application, AS reads the app's dictionary so it knows
the terminology: the names of classes, commands, properties and
enumerations. But Cocoa is not an application, and it doesn't have an AS
dictionary. However, its terminology -- the class names and enums like
NSAlternateKeyMask -- is added to AppleScriptObjC applications in the form
of properties of the application. So if you want to refer to a class, or use
an enum, you precede it with "current application's ".

NSAlternateKeyMask is an enum, like an AppleScript enumeration. (In the next
line, NSEvent is a Cocoa class, and modifierFlags() is an NSEvent method.)
There is no separate documentation, other than what you see if you search in
Xcode Help or Apple's developer documentation online.

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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

  • Prev by Date: Re: Adobe Illustrator do script command
  • Next by Date: Re: Can't find the menu item of the context menu.
  • Previous by thread: Re: Detecting a keydown or key up.
  • Next by thread: AppleScript controlling Xcode 4.01
  • Index(es):
    • Date
    • Thread