This is simple Trick. you can ahk command with msdos command in following way.
echo "ahk command" > %temp%\tmp.ahk | start %temp%\tmp.ahk
as i want to message hello world.
echo msgbox hello world > %temp%\tmp.ahk | start %temp%\tmp.ahk
in above dos command underline is ahk command.