Jump to content

I dont Understand why


evilelf
 Share

Recommended Posts

Hello I am trying to understand why this will not work.

Now when i run this the first time it has no problems but when it starts over it never does this code.

Yes there is more scrip but i cant show :)

why would this be?

While $NW = 0
Send("{A Down}")
Sleep(50)
Send("{A Up}")
Sleep(20)
PixelSearch(728,14,748,30,0xD5D0AE)

If Not @error Then
    $NW = 1
    Send("X")
    Sleep(1000)
    Send("{A Down}")
    Sleep(30)
    Send("{A Up}")
EndIf
WEnd
Edited by evilelf
Link to comment
Share on other sites

This Works people can look below if you did not know.

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;; $Names;;;;;;;;;
$NW = 0
$Rerun = 1

While $Rerun = 1

While $NW = 0
Send("{A Down}")
Sleep(50)
Send("{A Up}")
Sleep(20)
PixelSearch(728,14,748,30,0xD5D0AE)

; Some Code



$NW = 0
WEnd
WEnd
Edited by evilelf
Link to comment
Share on other sites

  • Moderators

Do i put

If that is the only place your using $NW then you could just do this.

While 1
    Send("{A Down}")
    Sleep(50)
    Send("{A Up}")
    Sleep(20)
    PixelSearch(728, 14, 748, 30, 0xD5D0AE)

    If Not @error Then
        Send("X")
        Sleep(1000)
        Send("{A Down}")
        Sleep(30)
        Send("{A Up}")
        ExitLoop
    EndIf
WEnd
Link to comment
Share on other sites

This Works people can look below if you did not know.

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;; $Names;;;;;;;;;
$NW = 0
$Rerun = 1

While $Rerun = 1

While $NW = 0
Send("{A Down}")
Sleep(50)
Send("{A Up}")
Sleep(20)
PixelSearch(728,14,748,30,0xD5D0AE)

; Some Code
$NW = 0
WEnd
WEnd

This works just fine for me.

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