Jump to content

Quick Hotkey Question


Recommended Posts

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
Link to comment
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


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

Link to comment
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.


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

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