Sign in to follow this  
Followers 0
Bounda

Need a faster pixelsearch

2 posts in this topic

#include <Misc.au3>
#include <array.au3>

Global $on = 0
Global $coords
Hotkeyset("{F1}", "_power")

While 1
        Sleep(500)
    If $on = 1 Then
    $coords = PixelSearch(10, 10, 640, 480, 0x0000FE, 20, 3)
    If IsArray($coords) Then
        MouseClick("Left", $coords[0], $coords[1], 1, 0)
    EndIf
    EndIf
Wend

Func _power()
If $on = 1 Then
    $on = 0
Else
    $on = 1
EndIf
EndFunc

Func _exit()
    exit(0)
EndFunc

Help would be appreciated!

Share this post


Link to post
Share on other sites



Well... Lower your sleep or shorten your region to search (it's quite large)... otherwise, you'll need to write something in a lower level language.


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.

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