Xamil Posted April 4, 2006 Posted April 4, 2006 Hi, i need a way to find the exact coordinates of a special text in the browser window. (in my case its the firefox) This textposition variates every time the browser is opened. It should be like X=FindTextX("text"), Y=FindTextY("text") Is there a way without IE.au3 and without Internet Explorer Functions? Thx for ideas
Moderators SmOke_N Posted April 4, 2006 Moderators Posted April 4, 2006 If the location is not in the source... Then without creating an OCR (quite tedious), I'm not sure it's possible with other browswers at this time. 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.
Evil_Has_Survived Posted April 4, 2006 Posted April 4, 2006 hmm what about WinWaitActive ("firefox") send("tab") if text MsgBox("text box found") this isn't really a real code but maybe something like that might work if you think it will ill try making the script for you Thanks in advance
Xamil Posted April 5, 2006 Author Posted April 5, 2006 (edited) Yeah, that´s a nice idea, because it will find the text but unforntunately it´s not exactly what i want. I need screen-coordinates. but thx ! Edited April 5, 2006 by Xamil
Evil_Has_Survived Posted April 5, 2006 Posted April 5, 2006 (edited) Yeah, that´s a nice idea, because it will find the text but unforntunately it´s not exactly what i want. I need screen-coordinates. but thx ! ok sorry .... well unless you did it in pixels say the text is red you could you findpixel goto autoit help Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf ; Find a pure red pixel or a red pixel within 10 shades variations of pure red $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf Edited April 5, 2006 by Evil_Has_Survived Thanks in advance
Xamil Posted April 5, 2006 Author Posted April 5, 2006 (edited) This is also a nice thought, but still not the right thing. I need to find the exact position of e.g. the word "Computer" on the Browser-Screen. It´s not a matter of Colour. You have to find the exact word and deliever the Screen-Coordinates. Edited April 5, 2006 by Xamil
herewasplato Posted April 5, 2006 Posted April 5, 2006 Look at PixelCheckSum and search the forum for screen scrape.I hope that this is not for a game - some foil PixelCheckSum.You define one rectangle that covers the word of interest.Use that rectangle with PixelCheckSum and get the CheckSum value one time.Then "scrape the screen" with a loop looking for that CheckSum value.I've tested this method (except the scrape) with the word "Computer" in your post using IE and Firefox. It worked just fine.Clear as mud?You probably don't need OCR just yet, but if you do, look at how happy SmOke_N was in this thread:http://www.autoitscript.com/forum/index.ph...showtopic=10891 [size="1"][font="Arial"].[u].[/u][/font][/size]
Evil_Has_Survived Posted April 5, 2006 Posted April 5, 2006 if you don't mind send a picture of the problem Thanks in advance
Xamil Posted April 5, 2006 Author Posted April 5, 2006 Look at PixelCheckSum and search the forum for screen scrape.I hope that this is not for a game - some foil PixelCheckSum.You define one rectangle that covers the word of interest.Use that rectangle with PixelCheckSum and get the CheckSum value one time.Then "scrape the screen" with a loop looking for that CheckSum value.I've tested this method (except the scrape) with the word "Computer" in your post using IE and Firefox. It worked just fine.Clear as mud?You probably don't need OCR just yet, but if you do, look at how happy SmOke_N was in this thread:http://www.autoitscript.com/forum/index.ph...showtopic=10891THANK YOU! This is great help and exactly what i needed (pixelchecksum and little bit of OCR!)Now i am on the right way !
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