Sign in to follow this  
Followers 0
jimmyxxx

Having problems, with autoclick and auto button program

3 posts in this topic

Hi everybody

First of all i would like to say hi :)

Srry for my english ;)

Second i ended one of my codes, it has to be with autoclick, auto Q button and auto spacebar

Btw, before 5 minutes of using it, the operative system crash (not blues creens, or bsdods) i mean it block, and its mposible to open another program, even shutting system down via windows is imposible, and only way is pressing reset button

here is the code

MsgBox(64, "AutoQ v3, by jimmyxxx ", "AutoQ actived"& @CR & @CR &"-F7 to Close Program"& @CR &"-F8 to Start/Stop Q"& @CR &"-F9 to Start/Stop LeftClick"& @CR &"-F10 to Start/Stop RightClick"& @CR &"-F11 to Start/Stop SpaceBar"& @CR &"-Everytime command is changed, previous command turns off")

HotKeyset ( "{F7}", "Quit")
HotKeyset ( "{F8}", "SwitchQ")
HotKeyset ( "{F9}", "LClick")
HotKeyset ( "{F10}", "RClick")
HotKeyset ( "{F11}", "space")

$run = True
$doL = False
$doR = False
$doQ = False
$space = False

While 1
    If $run Then
        If $doL Then MouseClick("left")
        If $doR Then MouseClick("right")
        If $doQ Then Send("q")
        If $space Then Send(" ")
    EndIf
    Sleep(0)
WEnd

Func LClick()
    Opt("MouseClickDelay", 3) 
    $doL = Not $doL
    If $doL = True Then $doR = False 
    If $doL = True Then $doQ = False 
    If $doL = True Then $space = False 
    EndFunc

Func RClick()
    Opt("MouseClickDelay", 3) 
    $doR = Not $doR
    If $doR = True Then $doL = False
    If $doR = True Then $doQ = False        
    If $doR = True Then $space = False 
    EndFunc

Func SwitchQ()
    $doQ = Not $doQ
    If $doQ = True Then $doL = False 
    If $doQ = True Then $doR = False
    If $doQ = True Then $space = False 
EndFunc

Func space()
    $space = Not $space
    If $space = True Then $doL = False 
    If $space = True Then $doR = False 
    If $space = True Then $doQ = False 
    EndFunc
    
Func Quit()
    Exit
EndFunc

Exit

If some know why does that happen, plz explain me.

Share this post


Link to post
Share on other sites



What's sleep(0) for? :)

And i'm not sure why it crashes...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Dunno i get base code from a friend and then i edit it.

Anyway i dont know for what is sleep(0)

PD: i deleted sleep (0), and it haven't crash yet, will make a few test to prove if it works.

Edited by jimmyxxx

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