0
votes

I have a hotstring in Autohotkey which displays a reminder any time a job code is typed with capital letters.

::lpn::
::nast::
::pca::
  if(GetKeyState("Shift")) ; check for capital letters
    MsgBox Reminder - Set direct pay to 100
return

Unfortunately, The default behavior of a hotstring is to replace any typed text. This means whenever I type NAST, it is replaced with .

Can I create a hotstring which doesn't erase the typed job code?

1

1 Answers

1
votes

This displays a MsgBox any time one of the job codes is typed in upper case. The code is not erased

:*B0C:LPN::
:*B0C:NAST::
:*B0C:PCA::
    MsgBox Reminder - Set direct pay to 100
return

Notes

  • B0 tells autohotkey not to backspace over the hotstring characters
  • C tells autohotkey that the hotstring is case sensitive

Ref