Re: set optionKeyDown to...
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