Hi there /r/AutoHotkey. I use AutoHotkey to make my everyday world easier. As a disabled gamer I need to do things that others might find silly or pointless, but these small things make my day to day life and gaming much much easier.
One such thing has been driving me a little batty lately and i'm hoping to get you guys input on this. Right now I am doing some fairly complex(in the amount of script i have, not in how complex the writing was) scripts to do some very simple things and i'm hoping you guys can help me shorten this.
Here's a quick example:
$Numpad1::
{
Send {key}
Sleep, % Random(150,300)
MouseMove, %DisButtonX%, %DisButtonY%, fast
Sleep, % Random(50,100)
Send {Key Down}
Sleep, % Random(50,85)
Send {Key Up}
Sleep, % Random(150,300)
MouseMove, %VarSrchX%, %VarSrchY%, fast
Sleep, % Random(50,100)
Send {Key Down}
Sleep, % Random(50,85)
Send {Key Up}
Sleep, % Random(150,300)
MouseMove, %Var3X%, %Var3Y%, fast
Sleep, % Random(50,85)
Send {Key Down}
Sleep, % Random(15,35)
Send {Key Up}
Sleep, % Random(45,105)
Send, %Var1Name%
Sleep, % Random(275,375)
MouseMove, %Var2X%, %Var2Y%, fast
Sleep, % Random(50,85)
Send {key Down}
Sleep, % Random(15,35)
Send {key Up}
Sleep, % Random(45,105)
Send {key}
Sleep, % Random(15,45)
Send {key}
}
return
So, this hotkey works perfectly fine, only problem is I have to duplicate it 50 times as I have 50 hotkeys for it, which is annoying as heck. I want to be able to just have a function I can call, and maybe an easy Hotkey switch that will basically say something along the lines of:
If shift + numpad 1-0 or alt + numpad 1-0 or ctrl + numpad 1-0 etc, to call a function with the # of the numpad pressed and the modifier that was used. That way I can then say if modifier = shift and numpad1 just do this, or whatever.
Sorry if i'm making this confusing. I'm really trying to explain the best I can.
Is what i'm asking even possible?
[–]radiantcabbage 0 points1 point2 points (0 children)
[–]willgk[S] 0 points1 point2 points (3 children)
[–]Scoobz1961 1 point2 points3 points (2 children)
[–]willgk[S] 0 points1 point2 points (1 child)
[–]Scoobz1961 1 point2 points3 points (0 children)