AngelzUnit Posted November 28, 2009 Share Posted November 28, 2009 (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 November 28, 2009 by AngelzUnit Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 28, 2009 Share Posted November 28, 2009 (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 November 28, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Xait Posted November 28, 2009 Share Posted November 28, 2009 (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 November 28, 2009 by Xait Link to comment Share on other sites More sharing options...
Developers Jos Posted November 28, 2009 Developers Share Posted November 28, 2009 What do you think the hotkey "{Q}" is? Did you want the letter Q? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now