Jump to content

[Solved]HotKeySet Help


HTBaaFly
 Share

Recommended Posts

Hi,

I am trying to make a script that will log me in when I press a key here it is :

HotKeySet("{1}", "Account1")
HotKeySet("{2}", "Account2")

While 1
    Sleep(100)
WEnd

Func Account1()
Send("{ENTER}")
Sleep(100)
Send("xxxxxxx")
Wait(20)
Send("{TAB}")
Wait(10)
Send("xxxxxxx")
Wait(10)
Send("{ENTER}")
EndFunc

Func Account2()
Send("{ENTER}")
Sleep(100)
Send("xxxxxxx")
Wait(20)
Send("{TAB}")
Wait(10)
Send("xxxxxxx")
Wait(10)
Send("{ENTER}")
EndFunc

It compiled with no errors but when I run it and and press a key say 1 it gives me this error:

Line -:

Error: Unknown function name.

What is the problem and how can I solve it?

Edit:Problem solved I wrote Wait instead of Sleep

Edited by HTBaaFly
Link to comment
Share on other sites

HotKeySet("{1}", "Account1")
HotKeySet("{2}", "Account2")

While 1
    Sleep(100)
WEnd

Func Account1()
#cs
Send("{ENTER}")
Sleep(100)
Send("xxxxxxx")
Wait(20)
Send("{TAB}")
Wait(10)
Send("xxxxxxx")
Wait(10)
Send("{ENTER}")
#ce
MSgBox(0,'',"1 pressed",0.5)
EndFunc

Func Account2()
#cs
Send("{ENTER}")
Sleep(100)
Send("xxxxxxx")
Wait(20)
Send("{TAB}")
Wait(10)
Send("xxxxxxx")
Wait(10)
Send("{ENTER}")
#ce
MSgBox(0,'',"2 pressed",0.5)
EndFunc

works for me =/

[right]~What can I say, I'm a Simplistic person[/right]

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