Jump to content
Sign in to follow this  

WinGetText & ControlGetText do not return >>>> visible text <<<<

Recommended Posts



I have the following output from window info tool:

>>>> Window <<<<
Class:  WindowsForms10.window.8.app.0.218f99c
Position:   1638, 1050
Size:   272, 110
Style:  0x16800000
ExStyle:    0x00010088
Handle: 0x004409CE

>>>> Control <<<<
Class:  WindowsForms10.RichEdit20W.app.0.218f99c
Instance:   1
ClassnameNN:    WindowsForms10.RichEdit20W.app.0.218f99c1
Advanced (Class):   [CLASS:WindowsForms10.RichEdit20W.app.0.218f99c; INSTANCE:1]
ID: 987040
Position:   48, 26
Size:   218, 70
ControlClick Coords:    67, 43
Style:  0x56000844
ExStyle:    0x00000000
Handle: 0x000F0FA0

>>>> Mouse <<<<
Position:   1754, 1120
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Ethernet-Gerät: Verbindung hergestellt

>>>> Hidden Text <<<<

At first I tried setting options:

Opt("WinSearchChildren", 1)
Opt("WinTextMatchMode", 1)
Opt("WinDetectHiddenText", 1)

Then I tried to get the visible text like the window info tool does but was unsuccessful.

all the following did not help.

1.) WinGetText("[CLASS:WindowsForms10.RichEdit20W.app.0.218f99c]")
2.) $handle = WinGetHandle("[CLASS:WindowsForms10.RichEdit20W.app.0.218f99c]")
3.) $handle = WinGetHandle("[CLASS:WindowsForms10.RichEdit20W.app.0.218f99c]")
4.) $handle = WinGetHandle("[CLASS:WindowsForms10.RichEdit20W.app.0.218f99c]")
5.) $handle = WinGetHandle("[CLASS:WindowsForms10.RichEdit20W.app.0.218f99c]")

Everything was unsuccessful. Can anyone please help?

Share this post

Link to post
Share on other sites

It looks like to match with the formats that you have put in your example, you must change WinTitleMatchMode to advanced. Look in the Auto-IT help file for the details.

Also, look at ControlGetText() if you want text from a specific control, which I would guess you are.

Share this post

Link to post
Share on other sites

It would appear you are trying to get a handle to a control using WinGetHandle.

$winHandle = WinGetHandle("class=WindowsForms10.window.8.app.0.218f99c", "")
$controlHandle = ControlGetHandle($winHandle, "WindowsForms10.RichEdit20W.app.0.218f99c1", "")
; or u can use the control id
; from there you can use ControlGetText()

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

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.