Sign in to follow this  
Followers 0
mokitooo

MouseClick on If + Func issue

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



Your first MouseClick doesn't have a 'button' defined..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Your first MouseClick doesn't have a 'button' defined..

Hey man, ty for the info, it works now, thanks. Edited by mokitooo

Share this post


Link to post
Share on other sites

You bet. Good luck.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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