I've migrated from Parallels to VMware Fusion.
I recorded a demo with Windows Notepad running in Unity view (like Parallels' Modality):
You can use the Type action to start an AutoHotkey script in a Windows app.
Perhaps you can use PowerShell also (but I'm not familiair with it).