echo msgbox | "C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe" *
The asterisk means "get the script from standard input". Some special characters in your script must be escaped with a caret (^).