Jump to content

ControlGetText isn't reading anything.


Recommended Posts

I cannot get this command to read other programs like, lets say an msn edit control. I am using the following simple code:

$window="[i]<Contact's Name>[/i]"
ConsoleWrite(ControlGetText($window, "", "Edit1"))

I have tried Edit1 through 9 and tried a few examples in the help such as "[CLASS:Edit; INSTANCE:1]" and that does not work in notepad or other windows such as msn...

"Edit1" will work in notepad, but when I have a message in my contact window, it will not read the message, can anyone explain how I can properly read controls on other programs?

-Joscpe

Link to comment
Share on other sites

  • Moderators

I cannot get this command to read other programs like, lets say an msn edit control. I am using the following simple code:

$window="[i]<Contact's Name>[/i]"
ConsoleWrite(ControlGetText($window, "", "Edit1"))

I have tried Edit1 through 9 and tried a few examples in the help such as "[CLASS:Edit; INSTANCE:1]" and that does not work in notepad or other windows such as msn...

"Edit1" will work in notepad, but when I have a message in my contact window, it will not read the message, can anyone explain how I can properly read controls on other programs?

Most custom controls like that cannot be read in the standard API call format such as ControlGetText.

Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment!

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Most custom controls like that cannot be read in the standard API call format such as ControlGetText.

Damn!

Thanks for responding. Do you know another way of reading it then?

Wait, it doesn't work on Firefox either, I doubt that uses a custom control.

Edited by Joscpe

-Joscpe

Link to comment
Share on other sites

  • Moderators

Wait, it doesn't work on Firefox either, I doubt that uses a custom control.

Actually, you couldn't be more wrong lol :) ...

The only ways I can thing to read these are an ocr, or to inject a dll into the executables and catch the text before they print it themselves (of course, you'd probably be responsible then of writing the text).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...