HTBaaFly Posted November 23, 2008 Share Posted November 23, 2008 (edited) 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 November 23, 2008 by HTBaaFly Link to comment Share on other sites More sharing options...
toonboon Posted November 23, 2008 Share Posted November 23, 2008 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 More sharing options...
HTBaaFly Posted November 23, 2008 Author Share Posted November 23, 2008 TY 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