shortcut menu

 From:  Michael Gibson
9758.36 In reply to 9758.33 
Hi hl,

re:
> Can you help me design a script:? I can press the shortcut key to open shortcut menu and
> press it again to close shortcut menu.Thanks!

Actually here's a simpler way that doesn't need any variables to be stored and doesn't need any onunload="" handler in the dialog either:

script: var panel = null; try { panel = moi.ui.getUIPanel( 'moi://ui/SidePane1.htm' ); } catch(e){} if ( panel ) { panel.moiWindow.close(); } else { moi.ui.createDialog( 'SidePane1.htm' ); }

- Michael

EDIT: updated to work on both v3 and v4.

EDITED: 16 Apr 2020 by MICHAEL GIBSON