Swift Posted December 28, 2007 Posted December 28, 2007 Heres what im tring to do... im tring to set a hotkey for a program so that...for instance you press f2..i want it to send Send("ByEBaal-5") you press f2 again...and it sends Send("ByEBaal-6") and so on...but i tried to make one using the Count-While example script...and failed...this is what i had...is there anything wrong with it??? HotKeySet("{f2}", "funck") While 1 Func funck() $count = 5 While 1 While $count < 1000000 ; Increase the count by one $count = $count + 1 Send("ByEBaal-" & $count) WEnd WEnd EndFunc WEnd ------------ Thanks!
weaponx Posted December 28, 2007 Posted December 28, 2007 1. You can't declare a function inside a loop. 2. Use a For Next loop for the count 3. Not sure if you really want to have the seceond while 1 loop... HotKeySet("{f2}", "funck") While 1 Sleep(10) WEnd Func funck() While 1 For $count = 5 to 1000 Send("ByEBaal-" & $count) Next WEnd EndFunc ;==>funck
Swift Posted December 28, 2007 Author Posted December 28, 2007 hmm..when i tested this... ByEBaal-1ByEBaal-2ByEBaal-3 and so on...i just want this to..you press f2..and it will type ByEBaal-1...then it STOPS...then press f2 again...and it will type: ByEBaal-2...and so on...sorry if i didnt clarify...and thanks for the EXTREMELY fast reply
weaponx Posted December 28, 2007 Posted December 28, 2007 Maybe.. HotKeySet("{f2}", "funck") Global $count = 1 While 1 Sleep(10) WEnd Func funck() Send("ByEBaal-" & $count) $count += 1 EndFunc ;==>funck
Nevin Posted December 28, 2007 Posted December 28, 2007 lol making baal games and don't feel like typing the game name in? If you try to make a new game too fast it fails anyway. I usually just copy and paste the game name and just change the numbers on the end. If you do it your way, you might want to add a function to lower the counter in case you create the game and it fails, because then when you try again you're gonna skip a number.
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