Jump to content

Recommended Posts

Posted (edited)

1. Would this make it keep searching for the color untill it finds it, and then once it finds it have it do the rest?

Do

$login = PixelSearch(420, 120, 500, 160, BD2000, 10 )

Until $login = BD2000

If $login = BD2000 Then

Sleep(7500)

MouseClick("left", 438, 274, 2)

Send("blahblahblah")

Sleep(1000)

MouseMove( 639, 266)

Sleep(2500)

MouseClick("left", 639, 266, 2)

EndIf

I just tried, and it gave me an error because of the BD2000. How do you put a color thats in hex in there? When I looked at the example, the color looked like 0x00001 or something like that, but when I went to a site it said the hex was BD2000.

2. Can you make it so it searches for a picture(the picture would only be like 5x5 pixels, something small) and then once it finds it click it?

Edited by Zamp
Posted

1. Pixel Search doesnt return a color... it Returns the x & y values.. $login[0] = x $login[1] = y

so...

while 1
$login = PixelSearch(420, 120, 500, 160, BD2000, 10 )
If Not @error Then
     Sleep(7500)
     MouseClick("left", 438, 274, 2)
     Send("blahblahblah")
     Sleep(1000)
     MouseMove( 639, 266)
     Sleep(2500)
     MouseClick("left", 639, 266, 2)
     exitloop
EndIf
WEnd

2. Dependes like off a website such as Autoit Logo(Header of Site) or a picture from a game...

3. Look at iniread() in the help file...

Posted (edited)

EDIT: Nevermind, it didn't work. How can I make it so it doesn't click then send the blahblahblah untill the game is ready for it? My computer lags a little when I start the game, so Sleep() doesn't work that well because sometimes the game will load fast and it works, and sometimes it takes a while to load and after it is loaded autoit already did what it was supposed to do.

And I want it to look for a picture in a game. Is that possible?

Edited by Zamp

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
×
×
  • Create New...