After thinking it through some more this is the best solution I have come up with so far
is to run the following in Mathematica so you can paste code into Mathematica that has formatting
FrontEndExecute[
FrontEnd`AddMenuCommands[
"DuplicatePreviousOutput", {Delimiter,
MenuItem["Raw Paste Clipboard", FrontEnd`KernelExecute[
NotebookWrite[InputNotebook[],
Catch[NotebookGet@ClipboardNotebook[] /.
Cell[r_, ___] :> Block[{}, Throw[r, tag] /; True];
$Failed, tag], Placeholder]
], MenuKey["v", Modifiers -> {"Control", "Shift"}],
System`MenuEvaluator -> Automatic]}]]
Next you can create Autohotkey scripts like the following
*SC023::
clipboard =
(
\!\(
\*SubsuperscriptBox[\(\[Sum]\), \(i =
1\), \(\[Placeholder]\)]\[Placeholder]\)
)
Send, ^+v
return
::sum::Sum[Placeholder[ ], `{t, 1, n`}]{Left 5}
$\endgroup$