#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #include %A_scriptdir%/lib/acc.ahk global childPathPen := "4.10.1.1.3.1" global childPathDele := "4.10.1.1.2.1.1" F1:: obj := Acc_GetInfoUnderCursor(), id:=obj.hwnd DetectHiddenWindows, On WinGetTitle, tt, ahk_id %id% WinGetClass, class, ahk_id %id% tt:=Trim(class="" ? tt : tt " ahk_class " class) ;MsgBox, 4096,, % "id" id "-->" tt " --> " obj.path " --> " SubStr(obj.text,1,100) return f2:: choosebutton(childPathPen,id) return f3:: choosebutton(childPathDele,id) return choosebutton(childPath,id) { local ;MsgBox,% "childPath:" childPath "id:" id Acc := Acc_Get("Object",childPath, 0, "ahk_id" id) Acc.accDoDefaultAction(0) } f6:: Reload return ;================================================== ;Acc:=Acc_Get("Object", obj.path, 0, "ahk_id " id) ;Acc.accSelect(1,0) ;MsgBox,% Acc.accValue(0) ;SendInput, {raw}{hetong} ;Acc.put_accValue(0,"value") ;Acc.accDoDefaultAction(0)
测试缺少函数,com库加上后,acc库里也没有你用的函数。。。
Acc_GetInfoUnderCursor()
学习了
学习了
学习了