Sign in to follow this  
Followers 0
allstar550

Quick Hotkey Question

4 posts in this topic

I've never tried to use a hotkey, until now that is. Its for the game runescape, some of you may know about it or hate it, but whatever. I want to make a hotkey that logs me in. I already have a script that does this, but i have click run script and find it whenever i want to use it. I switch worlds a lot so i have to log in a lot. My script ran, but nothing happened. I looked at the example in the help file, but it didn't help. Thanks

HotKeySet("{Esc}", "rslogin")
Func rslogin()
MouseClick("Left", 582, 433)
Sleep(200)
Send("johnDoe")
Send("{ENTER}")
Send("moosemoose")
MouseClick("Left", 439, 466)
EndFunc

Share this post


Link to post
Share on other sites



Try

HotKeySet("{Esc}", "rslogin")

while 1
sleep (100)
Wend

Func rslogin()
MouseClick("Left", 582, 433)
Sleep(200)
Send("johnDoe")
Send("{ENTER}")
Send("moosemoose")
MouseClick("Left", 439, 466)
EndFunc

I would also put in a hotkey to exit the script



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Hey Thanks, that made it work. I'll do some looking into the first part so i can learn how to do other ones. Thanks a lot.

Share this post


Link to post
Share on other sites

Hey Thanks, that made it work. I'll do some looking into the first part so i can learn how to do other ones. Thanks a lot.

Without the sleep loop your script just starts and stops instantly.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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