Sign in to follow this  
Followers 0
Beaner

text locate?

2 posts in this topic

Hey, I"m trying to build a macro for an online game called shimlar. Is there any way that I can do a word locate, kind of like pixelsearch. I need it to scan a small part of the screen for key words and then act according to them.

this is what i've done so far.

CODE

Sleep(5000)

While 1

MouseClick ( "left", 800, 160 )

Sleep(5000)

; If i could locate a word on the screen here, and then according to what it finds tell what mouse buttons to click

MouseClick ( "left", 514, 187 )

Sleep(4300)

MouseClick ( "left", 744, 160 )

MouseClick ( "left", 710, 227 )

WEnd

Share this post


Link to post
Share on other sites



OCR is hard. Do a search and you'll find discussions, examples, and some solutions.

But, since you are looking only for specific patterns in specific locations, you can likely do some simpler graphic-matching with PixelChecksum() and PixelGetColor().

First step is to get your target area down to the smallest screen area that will give reliable results. You need X/Y coordinates for the top/left and bottom right corners of the target box.

Tell us when you have that, and we can probably help you further along.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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