This needs some refinement but the following command returns the commandline used to call a particular emulator. Easy to grab the rom name directly in AHK and no need for fancy scripts to call your emulator..
wmic path win32_process where "caption='hoxs64.exe'" get commandline
Which gives..
CommandLine
"D:\Emulation\C64\Emulators\Hoxs64\hoxs64.exe" -fullscreen -autoload "D:\Emulation\C64\Games\Freeze\space pilot.prg"