Jump to content

Need quick help on my script


Recommended Posts

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
Link to comment
Share on other sites

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