ZennoLab Assemblies Documentation
SendText(String,Int32,Int32,String,Boolean) Method
Example 

Type: System.String

The header of the window.

Type: System.Int32

The x coordinate relative to the window.

Type: System.Int32

The y coordinate relative to the window.

Type: System.String

The text for send.

Type: System.Boolean

true if need to show the window on top of all; otherwise, false. Default value is false.

Sends a text to the specified window.
Syntax
public static string SendText( 
   string windowName,
   int x,
   int y,
   string text,
   bool topMost
)

Parameters

windowName

Type: System.String

The header of the window.

x

Type: System.Int32

The x coordinate relative to the window.

y

Type: System.Int32

The y coordinate relative to the window.

text

Type: System.String

The text for send.

topMost

Type: System.Boolean

true if need to show the window on top of all; otherwise, false. Default value is false.

Return Value

Type: System.String

The answer with information about the success of the current command's execution. If current command was successful then this answer is "ok"; otherwise message describing the error.

Remarks

There are several ways of calling this method. The parameter topMost have the default value and you can call the method without this parameter.

The x and y can be -1. In this case the text will be sent to the current window.

Example
The following code example demonstrates uses of the SendText method.
// send the text
string result = Emulator.SendText("Window", 200, 200, "it's a simple text for send");
// check result
if (result == "ok" && !Emulator.ErrorDetected) return "Text was sent";
else return "Fail";
// send the text
$result = ZennoLab\Emulation\Emulator::SendText("Window", 200, 200, "it's a simple text for send");
// check result
if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) return "Text was sent";
else return "Fail";
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Emulator Class
Emulator Members
Overload List
SendKey Method
ErrorDetected Property

Send Feedback