Jump to content

A little help please..


Recommended Posts

I am trying to make a script that will check a pixel every 2.5 seconds and if a certain color is there, it will move the mouse to that pixel and click. I am very new to this and could use a lil help if someone would be so kind :)

PixelGetColor, color, ( 1132 , 647 )

if color = 0xEDECEC then

MouseMove( 1132, 647 )

Sleep(500)

MouseDown("left")

MouseUp("left")

endif

Sleep 2500

That is what i have so far, and I really dont have much of a clue. I also need it to loop :lmao:

Link to comment
Share on other sites

I am trying to make a script that will check a pixel every 2.5 seconds and if a certain color is there, it will move the mouse to that pixel and click. I am very new to this and could use a lil help if someone would be so kind :)

PixelGetColor, color, ( 1132 , 647 )

if color = 0xEDECEC then

MouseMove( 1132, 647 )

Sleep(500)

MouseDown("left")

MouseUp("left")

endif

Sleep 2500

That is what i have so far, and I really dont have much of a clue. I also need it to loop :lmao:

Look for TimerInit, TimerDiff, and While loop in the helpfile.

Edited by jaberwocky6669
Link to comment
Share on other sites

Look for TimerInit, TimerDiff, and While loop in the helpfile.

$Start = TimerInit()
While 1
    If TimerDiff($Start) > 2500 Then
        If TimerDiff($Start) < 2550 Then
            $coord = PixelSearch(0, 0, 20, 300, 0xEDECEC); change the rectangle box coords here
            If Not @error Then
                MouseClick("Left", $coord[0], $coord[1])
            EndIf
        EndIf
    $Start = TimerInit()
    EndIf
WEnd

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

Thanks for the quick replies, but im afraid im still lost :)

"$coord = PixelSearch(0, 0, 20, 300, 0xEDECEC); change the rectangle box coords here"

is this the only part i need to alter? i just need to search a single pixel, 1132, 647, so would this work:

(1132, 647, 1132, 647, 0xEDECEC)

P.S. sorry if these questions are really stupid :lmao:

Link to comment
Share on other sites

Thanks for the quick replies, but im afraid im still lost :)

"$coord = PixelSearch(0, 0, 20, 300, 0xEDECEC); change the rectangle box coords here"

is this the only part i need to alter? i just need to search a single pixel, 1132, 647, so would this work:

(1132, 647, 1132, 647, 0xEDECEC)

P.S. sorry if these questions are really stupid :lmao:

(1131, 646, 1133, 648, 0xEDECEC)

now its a tiny rectangle. and the color should be inside.

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

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