Jump to content
Sign in to follow this  
AlexR

ControlGetText

Recommended Posts

AlexR

Hello!

I would like to get the text of a textbox.

I used the function ControlGetText, but this function didnt return always a string.

e.g. my Textbox is empty I get null string with the follow command:

ControlGetText(myForm, , ID_of_TextBox)

What is the second parameter for?

If my textbox contains something I can use some first letters at the second parameter to get the complete text.

Have someone an explanation for me? Im little confuse

Best regards,

Alex

Edit: Have this function known issues with Controls like Infragistics.Win.UltraWinEditors.UltraTextEditor?

(Just a TextBox from Infragistics)

Edited by AlexR

Share this post


Link to post
Share on other sites
Aassdd

It's the visible text of the window that autoit will search for but you can leave it empty if there's only 1 window with the same name in your taskbar.

Share this post


Link to post
Share on other sites
Richard Robertson

If another window with the same title exists, and the text is blank, it will match the last one that was active.

Share this post


Link to post
Share on other sites
AlexR

thanks,

but my problem is that the function doesn't return any string. The parameters should be okay, because the function controlgethandle works fine with the same parameters and return the right handle

Share this post


Link to post
Share on other sites
Aassdd

Can you post a screenshot of the window you want to get text WITH autoit window info (and "control" tab selected) please.

Edited by Aassdd

Share this post


Link to post
Share on other sites
AlexR

no it doesn't help.

I think autoIT doesn't work with infragistic controls ...

Edited by AlexR

Share this post


Link to post
Share on other sites
Richard Robertson

AutoIt (as well as most other simulation programs) will have issues with .Net forms because the controls get rendered differently some times due to the runtime processes. Look for something called like, AnyWindow or something like that on this forum. I remember seeing it but I can't remember the name.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.