Sign in to follow this  
Followers 0
epia

How to get by script/command the Text data from au3info control tab

5 posts in this topic

Hello,

i try to read the containing text of some controls of a programm that runs under WinNT. AutoIt runs well for most controls with ControlGetText. But for some controls ControlGetText fails. They give back only empty strings.

As example the control tab of au3info says for one of the failing controls:

Class Static

Instance 138

ClassnameNN Static138

Advanced [Class: Static; Instance: 138]

ID 8290

Text 23735 <== Needs this text, its a changing programm status information

Position 1182, 835

Size 40, 15

Controlclick Coord. 19, 8

Ex....

Style...

Handle 0x0001036A

The control of this example is identified and accessable. I need as programm status information the Text that is marked in the example above (next under ID). The succesfull accessed controls doesnt show any text at that line with au3info.exe. It seems not to be a containing text but the control identification text which is used within the script commands e.g ControlGetText ( "title", "text", controlID ).

So what kind of text is this?

How to get the same data like the "Text" from au3info programmaticly with autoit script?

Regards, epia.

Share this post


Link to post
Share on other sites



try this

$controltext = ControlGetText("wintitle","","[CLASS:Static; INSTANCE:138]")
ConsoleWrite("$controltext " & $controltext & @CRLF)

Share this post


Link to post
Share on other sites

Hi rvn,

thank you for helping.

Your code is working succesfully for my "bad" controls.

I tried it with

$controltext = ControlGetText("wintitle","",8920).

Why its better to use

$controltext = ControlGetText("wintitle","","[CLASS:Static; INSTANCE:138]") ?

Regards,

epia

Share this post


Link to post
Share on other sites

i never say it better... i though you fail with ID?!

Share this post


Link to post
Share on other sites

Hi rvn,

obviously, you are right :blink:

But of course i am interested in a technical reason to learn for better scripting.

Yours, epia

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