Jump to content
Sign in to follow this  
pezo89

Pixelsearch issues

Recommended Posts

pezo89

Hello, help please =) , im a newbie with this as u obviously can see ^_^ , so please explain any response with many many words ;)

anyhow, the issue is that the first pixelsearch is just not beeing done at all, just jumps to the second one, how can i bypass that? so it is done in the correct order, and

also, Question; is there any way to have it sleep for certain amount of time before beeing done again, not the entire script, but one of the pixel searches :(

in advance, thank you for taking the time to reply :D

Code;

while 1

$coord = PixelSearch( 1, 1, 1058, 122, 13753825 )

If @error Then

Send ("{CTRLDowN}")

sleep ("200")

mousemove ( 1076, 128, 12)

sleep ("200")

mouseclick ("Left", 1076, 128, 2, 20)

send ("{CTRLUP}")

sleep ("2000")

Send ("{F1}")

sleep ("20")

Send ("{F2}")

sleep ("20")

Send ("{F3}")

sleep ("20")

sleep ("18000")

EndIf

$coord = PixelSearch( 0, 0, 298, 743, 8348672 )

If Not @error Then

sleep ("60000")

EndIf

If @error Then

MouseMove ( "Right",197 , 604, 30)

sleep ("500")

MouseMove ("Left",264 , 663, 45)

sleep ("200000")

EndIf

WEnd

Func MyExit()

Exit

EndFunc

Share this post


Link to post
Share on other sites
Marlo

Firstly, your code has some syntax errors, here is the correct code:

While 1

    $coord = PixelSearch(1, 1, 1058, 122, 13753825)


    If @error Then

        Send("{CTRLDowN}")
        Sleep("200")
        MouseMove(1076, 128, 12)
        Sleep("200")
        MouseClick("Left", 1076, 128, 2, 20)
        Send("{CTRLUP}")
        Sleep("2000")
        Send("{F1}")
        Sleep("20")
        Send("{F2}")
        Sleep("20")
        Send("{F3}")
        Sleep("20")

        Sleep("18000")
    EndIf
    $coord = PixelSearch(0, 0, 298, 743, 8348672)
    If Not @error Then
        Sleep("60000")
    Else
        MouseClick("Right", 197, 604, 30)

        Sleep("500")
        MouseClick("Left", 264, 663, 45)

        Sleep("200000")
    EndIf

WEnd
Func MyExit()
    Exit
EndFunc   ;==>MyExit

Secondly, it doesnt skip any code for me.


Click here for the best AutoIt help possible.Currently Working on: Autoit RAT

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  

×