I have no knowledge whatsoever about PMC, but in AHK your code above would constitute a
hotstring subroutine. I would look for this term in PMC as well. (The multi-line subroutine above would miss a closing
return, though, with potential unwanted side-effects in a larger script. Instead of a
return, you could create an one-line auto-replace hotstring:
:*:AB ::ABCDEF with implicit
Send and
Return.)
The asterisk is completely optional and its removal would not cause an error in AHK. It just modifies the hotstring's behaviour:
This means, if you remove
* from your own code, you would need to type a, b, space and additionally another ending character like space, enter or
-()[]{}':;"/\,.?!`t (by default) to trigger your hotstring. This also means that
::AB::ABCDEF (without the space) would almost do the same like your code above, but it would also trigger with other ending characters, not just
space.
I personally think that learning PMC only complicates matters, as for many things it seems at least as complex as directly using AHK. With the crucial difference that you actually get forum support and a lot of resources for AHK.