OminousIdol Posted August 13, 2004 Share Posted August 13, 2004 Is it possible in Auotit v3 to search for a certain string inside of a doucment? Then getting the X,Y of that string? If so could somone please explain to me how I could go about doing this! Thanks! Link to comment Share on other sites More sharing options...
trids Posted August 13, 2004 Share Posted August 13, 2004 (edited) If you're wanting to parse there may be better ways (eg: use StringReplace)Otherwise, read the entire file into a string. StringSplit the string into an array. Walk the array to find the row and use StringInStr to find the column.HTH Edited August 13, 2004 by trids Link to comment Share on other sites More sharing options...
OminousIdol Posted August 13, 2004 Author Share Posted August 13, 2004 If you're wanting to parse there may be better ways (eg: use StringReplace) Otherwise, read the entire file into a string. StringSplit the string into an array. Walk the array to find the row and use StringInStr to find the column. HTHÂ <{POST_SNAPBACK}>Hmm probably should of stated that better! I meant like inside of Internet Explorer search for a certain String like actual "TEXT"! Then once it finds it! It would tell me the X,Y coords of that TEXT.... I dont know if this can be done but if it can please tell me how! Sorry about not starting my question better I already knew how to search for Strings in a Text DOCUMENT but I really like to know if I can Serach for TEXT in a Internet Explorer! Thanks!! Link to comment Share on other sites More sharing options...
this-is-me Posted August 13, 2004 Share Posted August 13, 2004 You CANNOT find anything in an internet explorer window. If you use the included AU3_SPY, you will find out that autoit will not and cannot "see" text or buttons or anything else in internet explorer. You would have to learn javascript to get the position of the control or text in internet explorer. Who else would I be? Link to comment Share on other sites More sharing options...
Bartokv Posted August 13, 2004 Share Posted August 13, 2004 I know of at least two ways for you to be able to determine what should be displayed within a browser's window: 1) Download the source via URLDownloadToFile, then parse the document.2) Capture the browser text via Send("^a") and ClipGet, then parse the clipboard....However, neither one of these methods will provide direct coordinates of the text within the browser's window. Although you could build an emulator routine that would take into consideration the size of the browser's main window, the font size, and displayed image/table dimensions to calculate the approximate location of the text -- but that's just way too much work if you ask me! Another highly impractical idea would be to build a type of OCR routine... This routine would need to calculate a pixel map based off of the displayed fonts within the browser, and then use a modified PixelSearch routine to find the best match within the window.Overall I'd have to generally agree with this-is-me, and say that it is highly improbable that you'd be able to find the exact coordinates of the text within the IE browser window. ...At least according to my knowledge of AutoIt. Link to comment Share on other sites More sharing options...
pekster Posted August 13, 2004 Share Posted August 13, 2004 Although I do see where this could provide useful, there shouldn't be a need to get the coordinates from items in a browser window in most cases. As it is, you can tab, shift-tab, control-tab, and control-shift-tab to move between elements, links, buttons, and sections of the document. If this does not provide enough control, consider using a more powerful browser, such as Firefox, which has the ability to search for links as you type, and search for any test that appears on the page if you send a slash "/" and then some text. Between that search ability, and the use of tabs, you should be able to get to any element of a page you wish. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
OminousIdol Posted August 13, 2004 Author Share Posted August 13, 2004 (edited) Thanks for all your comments! Haha did not think of using tab that would probably work for what I am trying to do! But say you tab to a certain item in IE are you able to find out where you tab X/Y ??? EDIT I found the command to search the whole screen! Buts its not very accurcate is it? Trying to find a color that is on the screen but its really small and it could not find! Thanks! Edited August 13, 2004 by OminousIdol 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