| Menu in the dialog window |
|---|
|
The standard menu: // Menu in the dialog window (JScript) // File: menu.w_js var hMenu = Window.CreateMenu(); Window.AppendMenu(hMenu,"MF_STRING",8000,"Option &1"); Window.AppendMenu(hMenu,"MF_STRING",8001,"Option &2"); Window.AppendMenu(hMenu,"MF_SEPARATOR",8002,""); Window.AppendMenu(hMenu,"MF_STRING",8003,"Option &3"); Window.AppendMenu(0,"MF_POPUP",hMenu,"Preferences"); Window.DestroyMenu(hMenu); Window.DrawMenuBar(); function WM_COMMAND(id) { switch (id) { case 8000: var shell=new ActiveXObject("WScript.Shell"); shell.Popup("Select id = " + id,0,"Menu",0); break; case 8001: Window.EnableMenuItem(id,1); // 0 - set break; case 8003: Window.CheckMenuItem(id,1); // 0 - reset break; }; }; |
| The new scripting host. |