检索上下文帮助标识符
#Include <GuiMenu.au3>
_GUICtrlMenu_GetMenuContextHelpID($hMenu)
$hMenu | 菜单句柄 |
返回上下文帮助标识符 |
#include <GuiMenu.au3>
_Main()
Func _Main()
Local $hWnd, $hMain, $hFile
; 打开记事本
Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
$hWnd = WinGetHandle("[CLASS:Notepad]")
$hMain = _GUICtrlMenu_GetMenu($hWnd)
$hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)
; Get/Set File menu help context ID
Writeln("File help context ID: " & _GUICtrlMenu_GetMenuContextHelpID($hFile))
_GUICtrlMenu_SetMenuContextHelpID($hFile, 1234)
Writeln("File help context ID: " & _GUICtrlMenu_GetMenuContextHelpID($hFile))
EndFunc ;==>_Main
; 写入一行文本到记事本
Func Writeln($sText)
ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CR)
EndFunc ;==>Writeln