Hi
I have just started in a game which has got Ctrl+1-9 and Alt+1-9 skill bars.
I would like to create something like
Ctrl +(number) or Alt +(number) for a skill that has got cooldown time (45sec for example) and needs to be able to play it in loop
Also a "one key" to activate on and off function for all the skills thats in loop
for example;
turn on
enter Ctrl +1, wait 45sec, enter again and so on
enter Ctrl+2, wait 200sec, enter again and so on
and an hotkey that i can turn the script on and off freely
much appreciated
thanks
arashi

Please help me with the script, thank you
Started by
arashi87
, Oct 31 2015 12:00 AM
3 replies to this topic
#1
-
Posted 31 October 2015 - 12:00 AM

While I am sure there are better options, here is one way to do what you want (I only did 1 & 2 for Ctrl & Alt)...
; Start timers for each key. SetTimer, Ctrl1, 45 SetTimer, Ctrl2, 200 SetTimer, Alt1, 45 SetTimer, Alt2, 200 Return ; Define the individual hotkeys. ^1:: ; Ctrl+1 CtrlOne := !CtrlOne Return ^2:: ; Ctrl+2 CtrlTwo := !CtrlTwo Return !1:: ; Alt+1 AltOne := !AltOne Return !2:: ; Alt+2 AltTwo := !AltTwo Return F12:: ; Enable/Disable all timers If ToggleAll = On ToggleAll = Off Else ToggleAll = On Loop, 2 ; Increase this to 9 once you have all 9 keys configured. { SetTimer, Ctrl%A_Index%, %ToggleAll% SetTimer, Alt%A_Index%, %ToggleAll% } Return ; Define the timers. Ctrl1: If CtrlOne Send ^1 Return Ctrl2: If CtrlTwo Send ^2 Return Alt1: If AltOne Send !1 Return Alt2: If AltTwo Send !2 Return
#2
-
Posted 02 November 2015 - 08:16 PM

Do note that with Shadow's example, the number in SetTimer has the units of milliseconds. To do seconds, multiply those by 1000. (e.g. 45 seconds is 45000 milliseconds).
#3
-
Posted 02 November 2015 - 09:26 PM

Do note that with Shadow's example, the number in SetTimer has the units of milliseconds. To do seconds, multiply those by 1000. (e.g. 45 seconds is 45000 milliseconds).
D'oh! Knew I had something wrong in there. Nice catch. Thank you.
#4
-
Posted 05 November 2015 - 06:10 PM
