Sign in to follow this  
Followers 0
Eradicator

Reading control text

4 posts in this topic

Greetings,

There is a control on a third party window that I need to get the text from. The Active Window Info tool says the following.

Size:           X: 343  Y: 5    W: 122  H: 17
Control ID:   394110
ClassNameNN:     TEdit2
Text:           Eradicator
Style:         0x540100C0
ExStyle:         0x00000000

I tried to read it like this.

$data = ControlGetText("Mywindow", "", "TEdit2")

It always returns an empty string and @error is always one, which means it failed to read the control. What did I do wrong? How can I read the control?

Regards,

Eradicator

Share this post


Link to post
Share on other sites



$data = ControlGetText("Mywindow", "", 394110) or

$data = ControlGetText("Mywindow", "", "[ClassNN:TEdit2]")

Share this post


Link to post
Share on other sites

$data = ControlGetText("Mywindow", "", 394110) or

$data = ControlGetText("Mywindow", "", "[ClassNN:TEdit2]")

Didn't work, it still returns "" and @error is still 1. What might be the problem?

Regards,

Eradicator

Share this post


Link to post
Share on other sites

u have wrong name of window or ID ( u have to write the name of window also with uppercase letter )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0