Jump to content

Reading a static label


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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().

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

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

Link to comment
Share on other sites

  • Moderators

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.

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

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
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...