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;
     };
   };
' Menu in the dialog window (VBScript)
' File: menu.w_vbs
   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)
    Select Case id
       Case 8000
            Dim shell
            Set shell = CreateObject("WScript.Shell")
            shell.Popup "Select id = " & id,0,"Menu",0
       Case 8001
            Window.EnableMenuItem id,1 ' 0 - set
       Case 8003
            Window.CheckMenuItem id,1 ' 0 - reset
     End Select
   End Function
Note:
You may dynamically modify the menu. Draw its: Window.DrawMenuBar.
content
The new scripting host.
JScript and VBScript are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.