Jump to content

Recommended Posts

Posted (edited)

It is often useful to add a sleep into loops.

While 1
Sleep(50)

$coord = PixelSearch( 0, 0, 400, 300, 0xc800ff, 50 )
If Not @error Then
    MouseClick("Left")
EndIf

WEnd
Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted (edited)

Being the rookie I am, I JUST noticed that it delays the response of the script.

Anyway to prevent this without lagging the CPU? Like maybe targeting just a small 30 x 30 pixel square aroudn the center of the screen(800 x 600)?

EDIT: Nevermind. ;P

Edited by CookieCop

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...