Sign in to follow this  
Followers 0
IkkabodTodd

A little help please..

7 posts in this topic

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:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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:

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

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

Aha it works! Thank you kind saviors!

Edited by IkkabodTodd

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