检索定位高亮设置
#Include <GuiToolBar.au3>
_GUICtrlToolbar_GetAnchorHighlight($hWnd)
$hWnd | 控件句柄 |
True: | 启用定位高亮 |
False: | 未启用定位高亮 |
#include <GuiToolbar.au3>
#include <GUIConstantsEx.au3>
$Debug_TB = False ; 检查传递给函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
Local $hToolbar, $fEnabled
Run("explorer.exe /root, ,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}")
WinWaitActive("My Computer")
Sleep(1000)
$hToolbar = _GUICtrlToolbar_FindToolbar("[CLASS:CabinetWClass]", "&File")
$fEnabled = _GUICtrlToolbar_GetAnchorHighlight($hToolbar)
MsgBox(4096, "信息", "Anchor highlight enabled: " & $fEnabled)
_GUICtrlToolbar_SetAnchorHighlight($hToolbar, Not $fEnabled)
MsgBox(4096, "信息", "Anchor highlight enabled: " & _GUICtrlToolbar_GetAnchorHighlight($hToolbar))
EndFunc ;==>_Main