/// ShowMenu.js 默认的菜单脚本

var lpItems;
var nItem;

lpItems=[["ItemA", MF_NORMAL, 101],
         ["ItemB", MF_SUBMENU],
           ["ItemB-1", MF_NORMAL, 102],
           ["ItemB-2", MF_NORMAL, 103],
           ["ItemB-3", MF_NORMAL|MF_LAST, 104],
         ["ItemC", MF_NORMAL, 105],
         ["", MF_SEPARATOR],
         ["ItemD", MF_NORMAL|MF_GRAYED, 106],
         ["ItemF", MF_SUBMENU],
           ["ItemF-1", MF_NORMAL|MF_CHECKED, 107],
           ["ItemF-2", MF_NORMAL, 108],
           ["ItemF-3", MF_SUBMENU|MF_LAST],
             ["ItemF-3a", MF_NORMAL, 109],
             ["ItemF-3b", MF_NORMAL|MF_LAST, 110]];

nItem=ShowMenu(lpItems, POS_CARET, POS_CARET);
if (nItem == -1)
  WScript.Echo("未选择");
else
  WScript.Echo("项目索引: " + nItem + "\n项目名称: " + lpItems[nItem][0] + "\n项目 ID: " + lpItems[nItem][2]);
