How do I write "If option key is down then" in AppleScript ?
How do I write "If option key is down then" in AppleScript ?
- Subject: How do I write "If option key is down then" in AppleScript ?
- From: Emile Schwarz <email@hidden>
- Date: Thu, 25 Mar 2010 15:06:24 +0100
Hi all,
the subject nearly says all.
I want to execute a piece of code when the option key is down and a
different one otherwise.
The nearest code I was able to find was:
tell application "Finder"
set fw to front window
choose from list {"Option 1", "Option 2"}
if the result is "Option 1" then
set bounds of fw to {0, 44, 580, 280}
else if the result is "Option 2" then
set bounds of fw to {0, 44, 740, 670}
end if
-- End of code
end tell
In another development environment, I am able to use (pseudo code):
If option key is down Then
code for this case
Else
code for this case
End If
So I am asking myself (and this list) if there is a different way to
code what I want to achieve...
TIA,
Emile
_______________________________________________
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