ControlSend
From AutoIt Wiki
Contents |
[edit] Description
Sends a string of characters to an application control. The first 2 parameter ("title" and "text") can be used independently or in conjunction to select the appropriate window. The "controlID" parameter is a combination of the class and class instance. The final required parameter is the string to be sent to the control, a final optional parameter controls how the keys are sent.
[edit] Syntax
ControlSend ("title", "text", "controlID", "string" ,<flag>)
[edit] Parameters
title = Begining title of the window
text = Text string from within the window's title.
controlID = The class and instance of the control to interact with. The tool "AutoIt v3 Window Info" can be used to obtain the controlID
string = Characters to send.
flag = Optional:
0 = Sends special characters.
1 = Raw keys are sent.
[edit] Return Values
Returns 1 if successful.
[edit] Example
Open Notepad :
$Var = ControlSend ("Untitled", "", "Edit1", "This is a test",0)
If $Var = 1 then MsgBox(1,"Test","It worked")
