ControlHide
隐藏控件
.
ControlHide ( "title", "text", controlID )
参数
title
|
目标窗口标题, 或句柄, 或类名. 参考窗口标题与文本(高级).
|
text
|
目标窗口文本. 参见 窗口标题与文本
|
controlID
|
控件标识符. 相关说明见 控件.
|
返回值
成功:
|
返回 1.
|
失败:
|
返回 0, 表示未找到窗口/控件.
|
函数示例
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Hide the edit control of Notepad using the handle returned by WinWait.
ControlHide($hWnd, "", "Edit1")
; Wait for 2 seconds.
Sleep(2000)
; Show the edit control of Notepad using the handle returned by WinWait.
ControlShow($hWnd, "", "Edit1")
; Wait for 2 seconds.
Sleep(2000)
; Close the Notepad window using the handle returned by WinWait.
WinClose($hWnd)
EndFunc ;==>Example
----------------------------------------
该函数可以通过命令 exect 调用
参见:
ControlShow, ControlCommand, ControlDisable, WinSetState
exect=ControlHide('[CLASS:TTOTAL_CMD]','''','TButtonBar1')||Sleep(2000)||ControlShow('[CLASS:TTOTAL_CMD]','''','TButtonBar1') ;; 2秒隐藏Total Commander工具栏
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|