0
A
回答
1
通常還可以使用按鍵訪問Windows控件。
在屏幕轉儲中選擇了Farmtt元素。那將是你的出發點。
你可以試試:
- 發送( 「{} DOWN」)向下移動的元素。 (「{TAB}」)導航到下一個控件(按鈕,複選框等)
- 發送(「{NumPadMult}」)遞歸地擴展SysTreeView32中的文件夾。
- 發送( 「{ENTER}」)ENTER鍵主鍵盤
等上
參考:
https://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm
+1
如果在擴展節點時存在加載時間,則在樹中使用這些熱鍵可能會很麻煩。 – Trevor
0
有在這裏兩件事情: 1)使用以下代碼片段:
;Gets the handle for the text
Func readFirstlevelTreeNodes($hWndCtrl)
Local $firstItemHandle = _GUICtrlTreeView_GetFirstItem ($hWndCtrl)
Local $iCount = _GUICtrlTreeView_GetSiblingCount($hWndCtrl, $firstItemHandle)
Dim $aRet[$iCount]
$aRet[0] = $firstItemHandle
For $index = 1 To $iCount - 1
$aRet[$index] = _GUICtrlTreeView_GetNextSibling ($hWndCtrl, $firstItemHandle)
$firstItemHandle = $aRet[$index]
Next
getTreeNodeTextList($hWndCtrl,$aRet)
EndFunc
; Gets the text for given sibling node handle lists
Func getTreeNodeTextList($hWndCtrl,$aRet)
ConsoleWrite("Tree Node first level list"&@CRLF)
For $index = 0 To Ubound($aRet) -1
ConsoleWrite(_GUICtrlTreeView_GetText ($hWndCtrl, $aRet[$index])&@CRLF)
Next
EndFunc
您可能會看到fir st級樹節點。 2)如果你仍然看不到輸出,那麼請驗證控制手柄值和窗口句柄。如果他們是正確的,它仍然不會顯示第一級樹節點,然後嘗試以管理員身份運行您的sciTE編輯器。
我認爲這應該有所幫助。
相關問題
- 1. 如何使用的AutoIt
- 2. 如何使用的AutoIt
- 3. 如何使用AutoIT運行bat文件?
- 4. 無法使用的AutoIt
- 5. 如何在Python中調用AutoIt腳本
- 6. 我以這種形式如何循環使用的AutoIt
- 7. 如何使用AutoIt輸入沒有控件ID的文本?
- 8. AutoIt的
- 9. AutoIt DLL調用
- 10. 同時使用硒和AutoIt的
- 11. 如何刪除文件與AutoIt的
- 12. 如何使用Autoit執行JavaScript後獲取源代碼
- 13. 如何使用AutoIt在Windows中打開「運行窗口」?
- 14. 如何使用AutoIt更改字段與日期?
- 15. 如何使用AutoIt在ListBox中獲取文本
- 16. 如何使用AutoIt在文本框中輸入值?
- 17. 如何在AutoIt中使用鍵盤輸入?
- 18. AutoIt的SetKeyboardLayout
- 19. 在AutoIt的
- 20. Autoit ControlSend
- 21. 使用AutoIt訪問GUI元素
- 22. 使用AutoIt ControlClick點擊PictureBox失敗
- 23. 使用AutoIT自動化遠程窗口
- 24. Autoit在使用MouseClick時打開卡片()
- 25. 使用AutoIt編號運行Bat文件
- 26. AutoIt WinSetState,如何最大化快速書?
- 27. 如何通過tagtype在AutoIt中
- 28. 如何在AutoIt中發送數據包?
- 29. 有沒有辦法使用PrintWindow和控件? (使用的AutoIt)
- 30. 如果聲明不起作用AutoIT
如果這是一個常見的TreeView32控件,您可以使用[ControlTreeView](https://www.autoitscript.com/autoit3/docs/functions/ControlTreeView.htm)函數。由於您的控件類是SysTreeView32,應該很有可能工作... – Samoth