Silver21uk Posted August 10, 2006 Share Posted August 10, 2006 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 comment Share on other sites More sharing options...
FuryCell Posted August 10, 2006 Share Posted August 10, 2006 (edited) Opt("WinDetectHiddenText",0) 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 August 10, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 10, 2006 Moderators Share Posted August 10, 2006 (edited) This doesn't answer your question, but the button below ... what is "Wright"? Edit: 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 EndFunc Edited August 10, 2006 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 comment Share on other sites More sharing options...
Silver21uk Posted August 11, 2006 Author Share Posted August 11, 2006 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 comment Share on other sites More sharing options...
Silver21uk Posted August 11, 2006 Author Share Posted August 11, 2006 Going to try that Opt('WinSearchChildren', 0) will let u know how that goes. Once its complete i will post the code, just incase anyone is interested in having it too. Works well for on the fly stuff. Link to comment Share on other sites More sharing options...
FuryCell Posted August 11, 2006 Share Posted August 11, 2006 jw. did you try the func that smoke_n posted? HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now