Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are backticks possible in AHK hotstring?

Tags:

autohotkey

I need to have a hotstring with backticks in it (`) surrounding it. Simplifying what I've tried:

::`hw`::Hello, World!

Running it gives an error: "Invalid hotkey".

I'm not sure why this restriction exists but more to the point: is there any workaround?

like image 535
MasterMastic Avatar asked Jul 18 '14 04:07

MasterMastic


1 Answers

A backtick (`) is the default escape character in AHK.
In order to specifiy a literal backtick, you can either escape it (with itself):

::``hw``::Hello, World!

Or change the escape character:

#EscapeChar \
::`hw`::Hello, World!

I wouldn't recommend the latter, since many libraries expect the escape char to be a backtick.

like image 146
MCL Avatar answered Nov 06 '22 07:11

MCL