Jump to content

Pixel Search Question


geocine
 Share

Recommended Posts

for example i got the pixel.. what command can i use to .. do this.. if the pixelsearch == true.. then send "{S DOWN}" but but if pixelsearch == false then send"{S UP}" .. help me please

$coord = PixelSearch(402,44,506,109, 0x4B52FF, 10)
    If Not @error Then
        Send "{S DOWN}"
    Elseif @error Then
        Send "{S UP}"
    EndIf

but what I want... is the script will keep on holding down S until the color is gone... how should i do that

Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100%
Link to comment
Share on other sites

This doesn't make much sense to me. Wouldn't a PixelGetColor be a lot better?

what i want to happen is when the color appears the S key is pressed until the color is gone..

Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100%
Link to comment
Share on other sites

  • Moderators

Bumpz

Blah... did you follow any of the code at all or even bother to look in the help file what each function call does?

While 1
    $coord = PixelSearch(402,44,506,109, 0x4B52FF, 10)
    If IsArray($coord)
        Send('{S Down}')
        While IsArray($coord)
            $coord = PixelSearch(402,44,506,109, 0x4B52FF, 10)
            Sleep(10)
        WEnd
        Send('{S UP}')
    EndIf
    Sleep(10)
WEnd
Edited by SmOke_N

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.

Link to comment
Share on other sites

Hi,

does this work?

While 1
    $coord = PixelSearch(402, 44, 506, 109, 0x4B52FF, 10)
    If Not @error Then
        Send("{S DOWN}")
    Else
        Send("{S UP}")
    EndIf
WEnd

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Sir smoke.. You got me goin.. How about making pixel search much faster. Because it's kinda slow,

Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100%
Link to comment
Share on other sites

Sir smoke.. You got me goin.. How about making pixel search much faster. Because it's kinda slow,

:D:party::):alien::alien::party::D

Yeah! How come you haven't fixed that yet, SmOke_N???

:P

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
Link to comment
Share on other sites

Yeah! How come you haven't fixed that yet, SmOke_N???

what i mean is, is there way to make pixelsearch search for colors on a certain pixel much faster and accurate... ?

Edited by geocine
Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100%
Link to comment
Share on other sites

what i mean is, is there way to make pixelsearch search for colors on a certain pixel much faster and accurate... ?

If it's a single pixel you're interested in, just use PixelGetColor() and it will probably be faster than PixelSearch().

:)

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...