Hi Ben
Probably the best available way to achieve what you want
is to interrupt your own command which shows this menu
- whether from a hotkey or a command on a button -
to enable a special set of hotkeys before showing the menu
and then disable them until the next time you show that menu.
As an example of the set of hotkeys, F12 might have the command:
cl.RunLeft("mymenu1", "5")
[if you want F12 to execute item 6 on the menu]
There are two main methods to enable a set of hotkeys:
either: Exec Hotkeys on <list of hotkeys>
or: Configure ImportHot c:/.../filename1.ini
To disable them, either: Exec Hotkeys off <list of hotkeys>
or: Configure ImportHot c:/.../filename2.ini
Filename2.ini has fewer hotkeys defined than in filename1.ini
and the missing ones get deleted from the list in menory
of imported hotkeys.
I think I would find the Exec Hotkeys method less trouble
to set up and much less vulnerable to errors than doing ImportHot.
Plan 1
For the command to show the menu, instead of just:
Menu Show mymenu1
First a command to enable a set of hotkeys such as
Exec Hotkeys on <list of hotkeys>
then do your: Menu Show mymenu1
You would need to add, to every command on the menu,
a command to disable that set of hotkeys.
Unfortunately if you dismiss the menu unused
by clicking away from it, the hotkeys would remain enabled.
Plan 2
You could enable them with a timed self destroy:
Change the command which used to show the menu
from: Menu Show mymenu1
to: run.mymenu
and the script mymenu
(which could be a file or a command list script)
Exec Hotkeys on <list of hotkeys>
;; [or: Configure ImportHot c:/.../filename1.ini]
menu show mymenu
wait until 1000 ;; [adjust timing to your taste]
Exec Hotkeys off <list of hotkeys>
;; [or: Configure ImportHot c:/.../filename2.ini]
With that plan there's no need to add, to every command in the
menu's command list, a command disabling the menu's special
set of hot keys.
That's a rough sketch; if you need more details about any part
do ask
Alan Martin
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/