Been using AHK for a long time, I mostly google around a lot for what I want AHK to do for me, then copy \ paste code parts and fiddle around until I can make it work. So my code might be real ugly. Unfortunately, I am stuck this time, after two days of google\trial\error testing, I had to registered a account to seek help from the gods on these forums. Sorry I just can't find any good info on this specific issue after -a lot- of google and testing. Help please!
This is what I have:
Code: Select all
~f7::Pause, Toggle
#If !A_IsPaused
~$e::SetTimer, e, % (Toggle_e := !Toggle_e) ? 2910 : "Off"
e:
Send, %A_ThisLabel%
return
#If
The core of the problem:
I don't want the script to activate e when I press e second time to toggle the loop off. I DO want it to send e keyboardclick when I initialy press e the first time to activate the loop, and that's working as intended. But when the loop is active I wish I could press the e toggle button again to turn the loop off without sending e again ingame. Hope I manage to explain so it's understandable.
Ingame Function:
Just to further complicate and give insight I can describe what the scrips purpose is:
I have four charges of a ability with slow recharge, when I use the ability I get a three second stacking buff. I want to loop the ability every 2.9-ish for perfect stack overlapping. Problem is that, some times, I want to use just one charge, not all of them, and not two of them. So clicking my e bind once gives me my desired first charge use, but when i click it again to turn the loop off it wastes one of my precious charges.
Help is very much appreciated guys, very very appreciated. Sorry for coming here with probably standard question but I've been trying a lot before i ask.
Thanks a lot in advance.
I will add a bunch of silly #hashtags to the bottom here, so that other people with my problem maybe can find this and learn. If anyone have any smart hashtags they think I should add here please go ahead and suggest. Or if this hashtaging is pointless go ahead and tell me and I'll remove this part. Just trying to make this accessible to others. #sendonce #looptoggle #Donotactivate #toggle #send #donotsend #pressbindonce #cantturnloopoffwithoutactivatingbind #toggleoff #togglenosend #nosendtoggle #sendontoggle #sendwhentoggle #turnoff #sendoff #dontsend #send #can't #cant #loop #excludefromloop #include #ignoresend #ignorebind #halt #help #notworking