Any way to show a context menu via a System Hotkey?

For instance, say I wanted to show the Tray Icon context menu by pressing some system-wide Hotkey.

I saw the CONTEXTMENU command, but couldn't ever get it to do anything via hotkey

Is this possible?

Scripting lets you show a custom menu (defined by the script) via a global hotkey.

There aren't generally ways to show menus for specific things without clicking those things.

Hi Leo

Thanks for the response.
I found the sample using scripting to build up a menu and then display it, so that's a start.

But, I guess my question is, is there any way, from a system wide hotkey, to display an existing command (say, one that's already defined by a button on a toolbar).

For instance, I have a button on a toolbar defined to pop up a custom menu of favorites. Works great, from within Dopus.

But what I'm looking to do is create a global hotkey to popup that same menu.

I can set a "hotkey" for that particular toolbar button just fine, but that unfortunately only works from within dopus. It's not a system hotkey.

The custom menu has no icon.

function OnClick(clickData)
{
    var dlg = clickData.func.dlg;
	var opt1 = DOpus.NewVector("1", "2", "3");
	var opt2 = DOpus.NewVector(opt1.length);
	dlg.choices = opt1;
	dlg.menu = opt2;
	var result = dlg.Show();
	if (result > 0) {
	    var item = opt1(result - 1);
		DOpus.Output(item)
	}
}

Hi WKen

:slight_smile: that's the exact code from the samples that I played with!

It works fine, but I was hoping to find a way to pop the menu that's configured on a particular toolbar button that's already defined. Writing the scripting code to replicate an existing toolbar button menu would be quite a bit of work, I suspect, esp considering that dopus has the ability to automatically insert and populate folder contents in the button menu, which is really nice!

Probably just a loop is needed, the problem is the icons. . .