Jump to content

Position Of Text In Browser (non Ie)


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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 by Xamil
Link to comment
Share on other sites

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 :mellow::)

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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

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 by Xamil
Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

THANK YOU! This is great help and exactly what i needed (pixelchecksum and little bit of OCR!)

Now i am on the right way ! :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...