各位高手请指点一下,我在记事本上加入菜单项,加入“计算器”菜单,我可以加入了但无法启动程序,请问要怎样搞??谢谢各位了!!!
#include <GuiMenu.au3>
Opt('MustDeclareVars', 1)
_Main()
Func _Main()
Local $hWnd, $hMain, $hItem1
; Open Notepad
Run("Notepad.exe")
WinWaitActive("无标题 - 记事本")
$hWnd = WinGetHandle("无标题 - 记事本")
$hMain = _GUICtrlMenu_GetMenu ($hWnd)
; Create subitem menu
$hItem1 = _GUICtrlMenu_CreateMenu ()
_GUICtrlMenu_InsertMenuItem ($hItem1, 0, "计算器 ", 0x1000)
; Insert new menu into Notepad
_GUICtrlMenu_InsertMenuItem ($hMain, 6, "工具程序", 0, $hItem1)
_GUICtrlMenu_DrawMenuBar ($hWnd)
EndFunc ;==>_Main
[ 本帖最后由 superlsw2008 于 2009-3-19 09:22 编辑 ] |