Jump to content

Recommended Posts

Created the proggy that records what im doing during an installation and creates the au3 script. Only one problem, I only want visible text. When i search through all the text, visible and hidden are included, can cause problems because some installations include every text for each page of an installtion for each page.

So this is what happens.

when a new window appears, i right click on the window. This gets the title, and searches through all the text and puts it into a gui.

all i want is the visible text some times the hidden text is included. any way to distinguish between the both. Oh and i did set OPT detect hidden text to 0

the pic will give a better desc

Link to post
Share on other sites


Specifies if hidden window text can be "seen" by the window matching functions.

0 = Do not detect hidden text (default)

1 = Detect hidden text

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to post
Share on other sites
  • Moderators

This doesn't answer your question, but the button below ... what is "Wright"?


This seemed to work fine on all the windows I tested it on:

MsgBox(0, 'No Hidden Text', _WinGetTextEX('Search Results'))
MsgBox(0, 'Hidden Text', _WinGetTextEX('Search Results', 1))
MsgBox(0, 'No Hidden Text And Child Search', _WinGetTextEX('Search Results', 0, 1))
MsgBox(0, 'Hidden Text And Child Search',  _WinGetTextEX('Search Results', 1, 1))
MsgBox(0, 'No Hidden Text, No Child, Fast Search', _WinGetTextEX('Search Results', 0, 0, 2))
MsgBox(0, 'Hidden Text, No Child, Fast Search', _WinGetTextEX('Search Results', 1, 0, 2))

Func _WinGetTextEX($hWnd, $OptHidden = 0, $OptChild = 0, $OptTextMode = 1)
    If IsString($hWnd) Then $hWnd = WinGetHandle($hWnd)
    $OptWDHT = Opt('WinDetectHiddenText', $OptHidden)
    $OptWDC = Opt('WinSearchChildren', $OptChild)
    $OptWTMM = Opt('WinTextMatchMode', $OptTextMode)
    Local $sText = WinGetText($hWnd)
    Opt('WinDetectHiddenText', $OptWDHT)
    Opt('WinSearchChildren', $OptWDC)
    Opt('WinTextMatchMode', $OptWTMM)
    Return $sText
Edited by SmOke_N

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 post
Share on other sites

Sorry taken so long to reply Wright, does as it sounds. Will open up notepad, send everything that is seen in the GUI, gives the user and option for save title and save it as an AU3 file. all i need to do is compile it and the script is created. Works really well just some things interfere.

Tried the Opt(windetectHiddentText) but still kept detecting text that was not visible.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...