Try this structure:
on keyDown
if the controlDown then
case the key of
"a":
-- do something for "a"
"b":
-- do something for "b"
... etc.
end case
end if
end
Feel free to put "the controlDown" and/or "the key" into local
variables at the top if you wish (helps with debugging).
Irv
At 9:26 PM -0800 2/20/02, Craig Taylor wrote:
>Hello everyone,
>
>i'm working on a program where there are about 15 shortcut keys available to
>the user - all are a combination of the Ctrl key + an alphanumeric key.
>Currently I have placed a similar piece of code in the movie script:
>
>on keyDown
>controlKeyDown = the controlDown
>
>if controlKeyDown and (the key = "a") then
>statement
>else
>if controlKeyDown and (the key = "b") then
>statement
>
>etc
>
>end if
>end if
>end
>
>Is there a less verbose way of doing this. I have tried a couple of
>different case structures, but if its possible, I must have the syntax
>wrong.
>
>Also, I tried an earlier message that I am not sure went through. Some time
>ago, I requested assistance with a system menu problem. It was recommended
>that I try the OSControl Xtra. Did just what I needed - many thanks for the
>advice.
>
>Thank you also for any thoughts on the previously mentioned.
>
>Cheers,
>--Craig
>
>
>Craig Taylor
>Renegade Digital Media Inc.
>
>
>
>
>Craig Taylor
>Renegade Digital Media Inc.
>
>T: 416.930.5206 or 705.733.1996
>F: 705-733-0503
>M: 30 Summerset Drive, Barrie, ON., L4N 9L7
>E: [EMAIL PROTECTED]
>www.renegadedigital.com
>
>(digital).video | (interactive).multimedia | (web).solutions |
>(DVD).authoring | (live_event).media_support
>
>
>
>Craig Taylor
>Renegade Digital Media Inc.
>
>T: 416.930.5206 or 705.733.1996
>F: 705-733-0503
>M: 30 Summerset Drive, Barrie, ON., L4N 9L7
>E: [EMAIL PROTECTED]
>www.renegadedigital.com
>
>(digital).video | (interactive).multimedia | (web).solutions |
>(DVD).authoring | (live_event).media_support
>
>[To remove yourself from this list, or to change to digest mode, go
>to http://www.penworks.com/lingo-l.cgi To post messages to the
>list, email [EMAIL PROTECTED] (Problems, email
>[EMAIL PROTECTED]). Lingo-L is for learning and helping with
>programming Lingo. Thanks!]
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]