Sign in to follow this  
Followers 0
Xamil

Position Of Text In Browser (non Ie)

10 posts in this topic

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

Share this post


Link to post
Share on other sites



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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Well, this is bad luck then for me :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Xamil

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 :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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Xamil

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

if you don't mind send a picture of the problem


Thanks in advance

Share this post


Link to post
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 ! :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0