How do I make the code pull form a variable key for (c, a, b, y, h, p, r) and insert that variable into the code.
Below the c variable could be (c, a, b, y, h, p, r)
Code: Select all
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$c:: ; $ prevents the next line from triggering this hotkey
send, c
keywait, c
return
Code: Select all
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$c:: ; $ prevents the next line from triggering this hotkey
send, c
keywait, c
return
c up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v ; I assume you meant 'Send, v' and not 'Send v,' like you had
return
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$a::
send, a
keywait, a
return
a up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v
return
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$b::
send, b
keywait, b
return
b up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v
return
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$y::
send, y
keywait, y
return
y up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v
return
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$h::
send, h
keywait, h
return
h up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v
return
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$p::
send, p
keywait, p
return
p up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v
#IfWinActive, ahk_exe Adobe Premiere Pro.exe
$r::
send, r
keywait, r
return
r up::
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
if (FocusedCtrl = "DroverLord - Window Class73")
Send, v