Jump to content

Read textbox content


savoy
 Share

Recommended Posts

Hi,

I'm new in AutoIt, first thanks it's a great tool!

I don't know if It's possible to analyse the content of a textbox or other composent like checkbox box of a Windows application.

I wrote a script and I want to test the content of a textbox.

I try to get the text content of a textbox with the ControlGetText ("", "", "m_pleCustomer")

function but it returns the name of the Control "m_pleCustomer" and not the content "Hello" for example.

It's possible to do that with autoit3 ?

Regards

Thanks

Link to comment
Share on other sites

Lookup GUICtrlRead in the helpfile.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Hi,

which apllication, which field?

If we can try on our own, it would be easier to find a solution.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

which apllication, which field?

If we can try on our own, it would be easier to find a solution.

So long,

Mega

It's an application developped in C++ with QT(Trolltech ),

With AutoIt Window Info I can see the ClassNameNN and Text

I use the Text Control cause there is no ControlID available.

This means that I try to automate an existing application I don't want to create new GUIs.

As I am new in AutoIt i don't understand if I can do this kind of post analyse on existing windows controls.

I try to use GUICtrlRead but it doesn't work. It is only AutoIt GUI specifc or it's a general function?

Thanks for your anwers sorry for my poor english and maybe stupid questions.

Link to comment
Share on other sites

HI,

suppose that GuiCtrlRead only works on Autoit GUIs, try

ControlGetText ( "title", "text", controlID )

and show the code of this command when it failed.

You can try the command really this way:

ControlGetText( "Tilte of window", "", "")

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

suppose that GuiCtrlRead only works on Autoit GUIs, try

ControlGetText ( "title", "text", controlID )

and show the code of this command when it failed.

You can try the command really this way:

ControlGetText( "Tilte of window", "", "")

So long,

Mega

Hi,

Thanks for your help

When I try the ControlGetText( "Tilte of window", "", "") it returns the title of the windows that is ok

BUT when I try on a control inside the windows:

For example :

ControlGetText( "Tilte of window", "m_pleCustomer", "m_pleCustomer") it returns m_pleCustomer

ControlGetText( "Tilte of window", "", "m_pleCustomer") it returns m_pleCustomer

it's the name of the Control and not the content of the control, I want to know the Name of the Customer in this example, I don't know if i'st possible.

I think there is no error cause the return is not blank.

Regards

Link to comment
Share on other sites

Hi,

Thanks for your help

When I try the ControlGetText( "Tilte of window", "", "") it returns the title of the windows that is ok

BUT when I try on a control inside the windows:

For example :

ControlGetText( "Tilte of window", "m_pleCustomer", "m_pleCustomer") it returns m_pleCustomer

ControlGetText( "Tilte of window", "", "m_pleCustomer") it returns m_pleCustomer

it's the name of the Control and not the content of the control, I want to know the Name of the Customer in this example, I don't know if i'st possible.

I think there is no error cause the return is not blank.

Regards

Hi

Is there a command like

$text = ControlGetText( "", "", "m_pleCustomer->text()") to get the content text of a windows application control?

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