找回密码
 加入
搜索
查看: 1365|回复: 4

在记事本加入菜单如何响应菜单中的程序??

[复制链接]
发表于 2009-3-19 09:21:41 | 显示全部楼层 |阅读模式
各位高手请指点一下,我在记事本上加入菜单项,加入“计算器”菜单,我可以加入了但无法启动程序,请问要怎样搞??谢谢各位了!!!
#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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2009-3-19 15:25:18 | 显示全部楼层
请各位高手看看,帮忙解决一下
 楼主| 发表于 2009-3-26 09:44:16 | 显示全部楼层
真的很难做到吗?请高手帮帮忙!!谢谢了!!
发表于 2009-3-26 12:32:29 | 显示全部楼层
是很难做到,估计你还得修改内存.
发表于 2009-3-26 12:44:25 | 显示全部楼层
你不给菜单句柄加入事件 怎么能运行相应的程序呢?
以为名字叫计算器 系统就认识奥?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-23 05:21 , Processed in 0.081628 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表