Jump to content

"Wend" statement with no matching "While" statement.:


HiNoTora
 Share

Recommended Posts

oops

remove the "Func" before Terminate() in the while loop

not good, it keeped spamming mouseclick

If IsArray($coord2) Then
    $coord2 = PixelSearch(280, 123, 350, 157, 0xD12222)
    If IsArray($coord2) Then
        MouseClick("primary", $coord2[0], $coord2[1], 1, 0)

but it hast to press it once if 

If IsArray($coord) Then
    MouseClick("left", 1265, 738, 1)
    Sleep ( 300 )

i modded my script, it works, but....

MsgBox(4096, "AutoTrade started", "Press ESC to exit")
HotKeySet("{ESC}", "Terminate")
while 1
$coord = PixelSearch(17, 753, 37, 765, 0x90F393); wait till positive position
If Not @error Then
    MouseClick("left", 1265, 738, 1); closing position
            Sleep ( 3000 )
                        $coord = PixelSearch(280, 123, 350, 157, 0xD32424); waiting for sale mark; If it dont find sale mark, then it goes to sleep.... But i need it sleeps some time and then trys it to find again untill it finds it
                        If Not @error Then
    MouseClick("primary", $coord[0], $coord[1], 1, 0); opening new position
    If @error Then  
       Sleep ( 100 )
 
    If @error Then  
       Sleep ( 100 )
    EndIf
 EndIf
 EndIf

 EndIf      
        If @error Then         
    Sleep ( 100 )
 EndIf
  wend 
 

    
     Func Terminate()
    Exit
EndFunc
Edited by HiNoTora
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...