RaoulKent Posted April 22, 2014 Share Posted April 22, 2014 HotKeySet("s", "reqjoin") Func reqjoin() MouseClick("Secondary") Sleep(10) MouseMove(280, 834, 1) Sleep(10) MouseClick("Primary") EndFunc ;==>reqjoin This should be a relatively simple problem in basic logic, but I didn't know what to look for to solve my issue, so I thought I might ask people with more expertise! Simply, when I run this script, it is very unhappy and just dies out the instant (only a few milliseconds of uptime) after I start it! How do I prevent it from doing so, and stay online, able to receive hotkeypresses more than once, until the script is paused or shut down? Thank you in advance, Raoul Link to comment Share on other sites More sharing options...
Solution FireFox Posted April 22, 2014 Solution Share Posted April 22, 2014 Hi, Welcome to the autoit forum How do you expect something to run indefinitly if it has nothing to do? You need to add an endless loop : ... While 1 Sleep(10) WEnd ... Please read the helpfile, if you did you would have seen that. Br, FireFox. Link to comment Share on other sites More sharing options...
RaoulKent Posted April 22, 2014 Author Share Posted April 22, 2014 Hi, Welcome to the autoit forum How do you expect something to run indefinitly if it has nothing to do? ... Please read the helpfile, if you did you would have seen that. Br, FireFox. Argh, of course. Thank you very much for a speedy response. I will make sure to make use of the helpfile! 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