Sign in to follow this  
Followers 0
mvp

Reading a static label

5 posts in this topic

Hi,

This is my first post. Is there a way to read static labels off a form with AutoIt? I am able to get text from the form via WinGetText. There are a few labels that I need to read. Any help is much appreciative.

Regards,

mvp

Share this post


Link to post
Share on other sites



Hi,

This is my first post. Is there a way to read static labels off a form with AutoIt? I am able to get text from the form via WinGetText. There are a few labels that I need to read. Any help is much appreciative.

Regards,

mvp

Generally they will have ControlID's still, have you tried using the AutoInfo to see if it is reading text there. If so, you could use ControlGetText().

[center]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.[/center]

Share this post


Link to post
Share on other sites

Generally they will have ControlID's still, have you tried using the AutoInfo to see if it is reading text there. If so, you could use ControlGetText().

Yes, I tried AutoInfo and that when I saw that the labels were not being reconized by AutoInfo. Can the actual VB ID be used in the ControlGetText function if known? Thanks

Share this post


Link to post
Share on other sites

Yes, I tried AutoInfo and that when I saw that the labels were not being reconized by AutoInfo. Can the actual VB ID be used in the ControlGetText function if known? Thanks

I know nothing of VB, but I do know one way to find out :).
MsgBox(64, 'Info', 'Text is: ' & ControlGetText('WindowName', '', 'ControlID'))
Although if AutoInfo isn't picking it up (text wise) then I doubt seriously that this is going to pick it up... But I have used "Static" as a controlid in the past.

[center]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.[/center]

Share this post


Link to post
Share on other sites

I know nothing of VB, but I do know one way to find out :).

MsgBox(64, 'Info', 'Text is: ' & ControlGetText('WindowName', '', 'ControlID'))
Although if AutoInfo isn't picking it up (text wise) then I doubt seriously that this is going to pick it up... But I have used "Static" as a controlid in the past.
I agree, it don't seem likely if AutoInfo can't see it. I will try the ControlGetText. Thanks

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