I am trying to make shortcut using autohotkey where typing "println" produces "System.out.println();" but typing ".println" produces ".println();". The purpose of this is to help me with something I commonly type when I'm writing code for my java course. I want use the regular keyboard dot to be not the numpad dot for this shortcut but I do not care about which dot is used in the output.
I have tried the following:
;for Java println
::println::
SendInput System.out.println();{Left}{Left}
return
;block change if '.println'
::.println::
SendInput {NumpadDot}println();{Left}{Left}
return
However, this only does the first shortcut and not the second. Can you help me get this script to work?