Sign in to follow this  
Followers 0
IKilledBambi

PixelSearch

4 posts in this topic

#1 ·  Posted (edited)

$searchcolor = 0x4B4626
$searchcolour = 0xA0AC58
While 1
$coord = PixelSearch(10, 10, 800, 580, $searchcolor)
    If IsArray($coord) = 1 Then
        MouseMove($coord[0], $coord[1], 0)
        $found = "yes"
        
Else
    $pos = MouseGetPos()
    $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 10) , ($pos[1] + 10), $searchcolor)
    If IsArray($coord) = 1 Then
        MouseClick('left', $coord[0], $coord[1], 1, 0)
    EndIf
EndIf
WEnd

is there any way to make this faster?

Edited by IKilledBambi

Share this post


Link to post
Share on other sites



using arrays makes ur script alot slower. so try not to use arrays.


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

using arrays makes ur script alot slower. so try not to use arrays.

Don't be rediculous... 1st look at what he's using (that returns an array itself).

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

Well, the problem isnt really finding the pixel :) When it finds the pixel, it takes like 4 seconds to click

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