Code: Select all
#IfWinActive ahk_class [particular app]
#IfWinActive
The hotstring I want to call is the following text expansion:
Code: Select all
:*:;in::intitle:
Code: Select all
!F6::
Send, {F6}
Send, :*:;in
return
Code: Select all
#IfWinActive ahk_class [particular app]
#IfWinActive
Code: Select all
:*:;in::intitle:
Code: Select all
!F6::
Send, {F6}
Send, :*:;in
return
Code: Select all
#IfWinActive ahk_class [particular app]
:*:;in::intitle:
#IfWinActive
Code: Select all
#IfWinActive ahk_class [particular app]
:*:;in::
SendInput, intitle:
return
!F6::
Send, {F6}
GoSub, :*:;in
return
#IfWinActive
Thanks for the explanation and code. Works great!GEV wrote:You can use GoSub to call the hotstring, but only if the hotstring executes another command (Send, Run etc.):Code: Select all
#IfWinActive ahk_class [particular app] :*:;in:: SendInput, intitle: return !F6:: Send, {F6} GoSub, :*:;in return #IfWinActive
No, I want the hotkey because I already have the hotstring, which I sometimes execute directly, but sometimes I want to execute it immediately after pressing F6, so rather than pressing F6 and then type ";in", I want a hotkey that sends F6 and then executes the hotstring.fischgeek wrote:You're confusing the difference between a hotkey and a hotstring. Wouldn't you just want the hotstring to be executed when you type ;in instead of using a hotkey?
Basically, you're asking the Send command to send the following keystrokes: :*:;in when in-fact, all you want is just the hotstring.
Code: Select all
#IfWinActive ahk_class [particular app] :*:;in::intitle: #IfWinActive
Users browsing this forum: Araphen and 410 guests