Method Reference
ControlSetText
Sets text of a control
ControlSetText "title", "text", "controlID", "new text"
Parameters
title | The title of the window to access. |
text | The text of the window to access. |
controlID | The control to interact with. See Controls. |
new text | The new text to be set into the control. |
Return Value
Success: | Returns 1. |
Failure: | Returns 0 if window/control is not found. |
Remarks
When using a control name in the Control functions, you need to add a number to the end of the name to indicate which control. For example, if there two controls listed called "MDIClient", you would refer to these as "MDIClient1" and "MDIClient2".
Related
ControlCommand, ControlGetText
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.Run "notepad.exe" oAutoIt.WinWait "Untitled -" oAutoIt.ControlSetText "Untitled -", "", "Edit1", "New Text Here"