Other Software > Developer's Corner
AHK: multiple hotstrings
(1/1)
Armando:
I guess I could post that simple question in a specialized forum, but I know many here are AHK experts so...
I make an extensive use of AHK "auto-replace hotstring" (to expand abbreviations as I type them).
Now, I'd like to know how to have multiple potential hotstrings for the same string replacement.
Example. Let's say I have this line :
--- ---:oc:parc2::tgsPÉtRe tgsPunié tgsPdoct tgsPThDo tgsPARC2 tgsPat tgsPthée
but I want to have more than one hotstring ("parc2" in that case) to trigger the string replacement "tgsPÉtRe tgsPunié tgsPdoct tgsPThDo tgsPARC2 tgsPat tgsPthée". (For example : I'd like to have "parc3" and "parc4" to trigger the same string replacement.)
What would be the proper syntax?
Thanks a lot!
lanux128:
why not just repeat them twice, like this..
--- ---::parc3::tgsPÉtRe tgsPunié tgsPdoct tgsPThDo tgsPARC2 tgsPat tgsPthée
::parc4::tgsPÉtRe tgsPunié tgsPdoct tgsPThDo tgsPARC2 tgsPat tgsPthée
jgpaiva:
The following solution would solve it:
--- ---:oc:parc1::
:oc:parc3::
:oc:parc2::
send, tgsPÉtRe tgsPunié tgsPdoct tgsPThDo tgsPARC2 tgsPat tgsPthée
return
(this way, all of them execute whatever comes after the :oc:parc2:: line, until they find a return)
[edit] damn, lanux beat me![/edit]
Armando:
Ah! Thanks guys.
Lanux : That's what I was doing already, but I didn't want to paste the string repeatedly : it's not convenient when you make changes to the string.
jgpaiva : Exactly what I was trying to do. :) The "send" command. Ok.
lanux128:
hehe.. at least jgpaiva understood the question better than me.. :)
Navigation
[0] Message Index
Go to full version