Sign in to follow this  
Followers 0
AngelzUnit

Need quick help on my script

4 posts in this topic

#1 ·  Posted (edited)

Hello everyone,

Straight to the point, I just need a script to randomly move the mouse pointer position every few minutes (~2 minutes) just so I don't get auto kicked from some games when I'm afk. This one doesn't seem to work, probably because I copy and pasted some of it hoping it would do the job.

Hopefully someone can help me out here, I'm sure the MouseMove, MouseDown etc commands is where I went wrong, probably not even the right one :) Don't need the pointer to move anywhere specific, just like a twitch.

Opt("TrayMenuMode",1)
HotKeySet("^q", "_Quit")
While 1 = 1
MouseMove(100, 100)
MouseDown ("RIGHT")
MouseUp("RIGHT")
sleep(120000)
WEnd

Func _Quit()
Exit
EndFunc

EDIT: I wanted the script to end when I press 'q' not sure if I added it in right ;)

Edited by AngelzUnit

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'd replace both the MouseUp and MouseDown lines with just one MouseClick statement. That'd probably get this thing going.<br><br>edit: the quit function seems ok too..<br>

Edited by snowmaker

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

Most games won't bring you out of AFK mode by a mouse move (I don't believe anyway) maybe try sending a key instead.

I changed the code a little (made the hotkey into its proper form, you missed the {} out. made a function to send space. and changed the sleep time so I didn't have to wait 2mins to check it lol)

HotKeySet("{Q}", "_Quit")
Opt("TrayMenuMode",1)
While 1 = 1
NoAFK()
sleep(1000)
WEnd

Func NoAFK()
    Send("{SPACE}")
EndFunc  

Func _Quit()
Exit
EndFunc

The HotKey doesn't work. Not sure why. I'm new too this too, i'll leave that to someone more advanced. and you can swap the sleep time back again, should still work fine

EDIT: by changing the {Q} hotKey to {ESC} the quit function works.

also changed it to a mouse click one for you:

HotKeySet("{ESC}", "Quit")
Opt("TrayMenuMode",1)
While 1 = 1
NoAFK()
sleep(1000)
WEnd

Func NoAFK()
    MouseClick("Left", 200, 200, 2)
EndFunc

Func Quit()
Exit 0
EndFunc

That clicks the left button 2 times at position 200, 200 and exits with escape

Edited by Xait

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