Phantom Documentation

[Help Home] [Phantom Home]
GetCaretX

int window.GetCaretX()

Applicable Classes: All

Return Type:
int
Parameters: none

Description:
This function returns the pixel location in the x direction of the caret, if this window has a caret. The location is with respect to the upper-left corner of the client area of the window.

Example Code

use "PhantomTarget.dec";
System("PhantomTarget.exe");

# Bring up the edit controls box
PhantomTarget._Controls.EditBo_x.Select();

# Intialize the text
Edit.Edit3.SetText("Hello Phantom User!!\r\nWelcome...");

# Click someplace past the text so the caret goes
# to the end of the text
Edit.Edit3.MouseClick(0, 60, 60, 0);

# Show the pixel location of the caret
disp(Edit.Edit3.GetCaretX());
disp(Edit.Edit3.GetCaretY());

# Exit out
Edit.OK.Click();
PhantomTarget.Close();


See Also: GetCaretY


Copyright 2000-2011 Phantom Automated Solutions