kra55 Posted April 22, 2009 Share Posted April 22, 2009 (edited) Search Hidden Text then copy the 8 letters after the word found... So far I have managed to go though controls searching for text and store them in variables for a later time....... I now need to select a window which is easy In this window there is a bunch of hidden text not assigned to a control. I am unsure how I go about searching this text for a particular word as I have only stored the full text previously and not used hidden text.... Once this word has been found I would then like for the 8 characters following this word to be copied. I apologize if there is a tutorial for this I have looked around and been unable to find what I am looking for..... If a couple examples could be provided or if I could be pointed in the direction of a tutorial that will tech me this it would be much appreciated...Thank you. Also is it possible to download the autoit documentation as i am unable to view any help files on the network i am on as i belive they use an external webpage? and i do not always have internet access Edited April 23, 2009 by kra55 Link to comment Share on other sites More sharing options...
John117 Posted April 23, 2009 Share Posted April 23, 2009 (edited) heres some autoit help-Unsure if there is a local filehttp://dundats.mvps.org/help/Most of what you are looking for sounds 'string' related. Try starting with those functions first.Edit: Oops, I didn't read well. If you have Autoit installed they should be here: -default install required (And this does not require internet)C:\Program Files\AutoIt3\AutoIt3Helpor Here:C:\Program Files (x86)\AutoIt3\AutoIt3HelpEdit: I will help more but need more specifics of what you are doing.Such as what kind of window?and do you have a sctipt to work with?If so, you may post the relevant section for help Edited April 23, 2009 by Hatcheda Link to comment Share on other sites More sharing options...
kra55 Posted April 23, 2009 Author Share Posted April 23, 2009 Thank you for you response. At this time I do not have any scripting other then a gui I have been working on. It simply calls winactivate "Account Info" as I am modifying a existing script that was pulling text from controls. Once again I have never pulled text from hidden text areas. I will now look into string manipulation as im guessing once I figure out how to pull the info from the hidden area. I will then be able to store it in a variable and work on the search/copy from there. Below I have provided a summary of the window as I am unsure what you mean by the type of the window. If it could be advised how to pull the hidden text im sure I can read around to find the string information.........In saying this feel free to advise how I would go about finding "Acct ID:" then storing the following 6 or 7 characters as it would obviously make things easier. Tho once again i will start reading up more on strings...Thank you.>>>> Window <<<<Title: Acct InfoClass: Afx:00400000:8:00010011:00000000:000106A1Position: -4, -4Size: 1288, 979Style: 0x1DCF8000ExStyle: 0x00000100Handle: 0x0003058A>>>> Control <<<<Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x000105D4>>>> Mouse <<<<Position: 353, 96Cursor ID: 2Color: 0xD4D0C8>>>> StatusBar <<<<1: For Help, press F12: 3: 4: 5: 6: 7: NUM8: >>>> Visible Text <<<<History log>>>> Hidden Text <<<<Bla bla bla bla bla bla bla - Acct ID: 123456 Link to comment Share on other sites More sharing options...
kra55 Posted April 23, 2009 Author Share Posted April 23, 2009 Ok so i have sorted out searching the string once it is loaded into a variable.....If at all possible can somone please advise how i pull hidden text based on the window summary above. I belive once i know how to do this i should be all good - Thank you for pointing me in the right direction so far ;This is a test - Once "Acct Info:" has been found ;I then know "Acct Info:" + 123456 will always be 17 chars ;Declare test string.... Dim $Adddet = "bla bla bla bla Acct Info: 123456 asdasdasd" ;Find location of acct info and remove one to ensure is correct number $result = StringInStr($Adddet, "Acct Info:") $result = $result - 1 MsgBox(0, "Search result:", $result) ;Remove all chars before "Acct Info:" now that we know where it is.... $Adddet = StringTrimLeft ( $Adddet, $result ) MsgBox(0, "Search result:", $Adddet) ;Get total length of string ;As we know "Acct Info:" + 123456 will be 17 chars we then remove 17 from total $len = StringLen($Adddet) $len = $len - 17 ;We now use the leftovers to trim the excess chars which leaves us with the result we want :) $Adddet = StringTrimRight ( $Adddet, $len ) MsgBox(0, "Search result:", $Adddet) Link to comment Share on other sites More sharing options...
Authenticity Posted April 23, 2009 Share Posted April 23, 2009 #include <WinAPI.au3> #include <Constants.au3> Run('calc.exe') WinWaitActive('Calculator') Dim $hWnd = WinGetHandle('Calculator') Dim $hChild = 0 $hChild = _WinAPI_GetWindow($hWnd, $GW_CHILD) If $hChild <> 0 Then Local $sTtitle Do $sTtitle = WinGetTitle($hChild) If $sTtitle <> "" Then ConsoleWrite($sTtitle & @LF) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) Until $hChild = 0 EndIf I think by hidden text you're actually referring to text other than the parent window? Link to comment Share on other sites More sharing options...
kra55 Posted April 23, 2009 Author Share Posted April 23, 2009 So are you saying that i cannot simply pull this info from the Hidden text and have to find the window/control the information is located in? And the code you have provided is a example for locating child windows? Link to comment Share on other sites More sharing options...
John117 Posted April 23, 2009 Share Posted April 23, 2009 #include <WinAPI.au3> #include <Constants.au3> Run('calc.exe') WinWaitActive('Calculator') Dim $hWnd = WinGetHandle('Calculator') Dim $hChild = 0 $hChild = _WinAPI_GetWindow($hWnd, $GW_CHILD) If $hChild <> 0 Then Local $sTtitle Do $sTtitle = WinGetTitle($hChild) If $sTtitle <> "" Then ConsoleWrite($sTtitle & @LF) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) Until $hChild = 0 EndIf I think by hidden text you're actually referring to text other than the parent window? Sorry, long drive home from work . . . Did this answer what you are asking? ^^^Above^^^^ If not, by window, I am asking what you are pulling that info from. Something we can duplicate? Is it a program? Is that post from the readout of Au3Info? Link to comment Share on other sites More sharing options...
John117 Posted April 23, 2009 Share Posted April 23, 2009 On review, I can see that is where you got your output. (Au3Info) With a simple test, I have verified that that exe is not an autoit compiled exe. I am not sure how to duplicate that output using autoit . . . Anyone else know? Link to comment Share on other sites More sharing options...
Authenticity Posted April 23, 2009 Share Posted April 23, 2009 Mind to explain what is an hidden text? Link to comment Share on other sites More sharing options...
John117 Posted April 23, 2009 Share Posted April 23, 2009 Mind to explain what is an hidden text?Sure:Run ->Au3Info.exe-> Switch to the 'Hidden Text' tab->Drag the 'Finder Tool' around till you see something. (Over your tool bar at bottom sould display something)Mine reads 'Google' when over IE because of the search option (upper Right) in ie 7 and 8 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