ControlEnable

首页  后退  前进

ControlEnable
down2

ControlEnable

启用"灰显"的控件.

 

ControlEnable ( "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)
    ; Disable the edit control of Notepad using the handle returned by WinWait.
    ControlDisable($hWnd, "", "Edit1")
    ; Wait for 2 seconds.
    Sleep(2000)
    ; Enable the edit control of Notepad using the handle returned by WinWait.
    ControlEnable($hWnd, "", "Edit1")
    ; Wait for 2 seconds.
    Sleep(2000)
    ; Close the Notepad window using the handle returned by WinWait.
    WinClose($hWnd)
EndFunc   ;==>Example

----------------------------------------

 

该函数可以通过命令 exect 调用

参见:

ControlDisable, ControlShow, ControlCommand

例子
copy

exect=ControlDisable('[CLASS:TTOTAL_CMD]','''','TButtonBar1')||Sleep(2000)||ControlEnable('[CLASS:TTOTAL_CMD]','''','TButtonBar1') ;; 2秒钟,禁用Total Commander工具栏

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru