Jump to content

MouseClick on If + Func issue


 Share

Recommended Posts

Hey guys look at this script:

WinActivate("A WINDOW")



$var_1 = PixelGetColor(638,579)
if $var_1 = 0 Then
    sleep(2000)
    Send("{ENTER}")
    sleep(5000)
    Else
    _DoCacota()
EndIf








Func _DoCacota()
    MouseClick(627,556,1)
    Sleep(1000)
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Send("{BS}")
    Sleep(1000)
    MouseClick("left", 633,581,1)
    Send("mokito13")
if $var_1 = 0 Then
    sleep(2000)
    Send("{ENTER}")
    sleep(5000)
Else
    _DoCacota()
EndIf
EndFunc

as i said to it, if the color is black (0), it must just send enter, but if it's not 0, so it means any other number, it must do _DoCacota. And then on that func, it must click to 627,556 , and then do all that other things; and then i've inputted the if again and the func on else to repeat it again and again if the color doesn't get 0.

Well, what is happening to me is that instead of clicking 627, 556 when it's not 0, it clicks on 633,581, writes "mokito13", then it backspaces, sleeps, clicks on 633,581 , writes "mokito13", and so infinitely, what's happening here?, why isn't it doing as I say him?

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