Sign in to follow this  
Followers 0
Swift

count up?

6 posts in this topic

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!

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

YAY!!! Thanks!! :) WOOT thanks :P

Share this post


Link to post
Share on other sites

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.

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