WinSetTitle
修改窗口标题.
WinSetTitle ( "title", "text", "newtitle" )
参数
title
|
目标窗口标题, 或句柄, 或类名. 参考 窗口标题与文本.
|
text
|
目标窗口文本. 参考 窗口标题与文本.
|
newtitle
|
窗口的新标题.
|
返回值
成功:
|
返回 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)
; Set the title of the Notepad window using the handle returned by WinWait.
WinSetTitle($hWnd, "", "New Notepad Title - AutoIt")
; Wait for 2 seconds to display the Notepad window and the new title.
Sleep(2000)
; Close the Notepad window using the handle returned by WinWait.
WinClose($hWnd)
EndFunc ;==>Example
----------------------------------------
该函数可以通过命令调用 exect
参见:
WinGetTitle, AutoItWinSetTitle, WinTitleMatchMode (Опция), WinGetHandle
exect=WinSetTitle('[CLASS:TTOTAL_CMD]','''','НОВЫЙ~~ЗАГОЛОВОК') ;;设置Total Commander窗口标题文本
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|