8

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?

MasterMastic
  • 20,711
  • 12
  • 68
  • 90

1 Answers1

18

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.

MCL
  • 3,985
  • 3
  • 27
  • 39