2017-05-12, 13:38
(2017-05-11, 23:09)myghalloween Wrote: Your solution works directly in the launcher but not in my script even with $rombasenoext$ in the laucher argument...
What do you think ?
Have a look at the Command Line Parameters of Autoit.
If you configure your launcher like this
Code:
run "C:\VMs\CPS3emulator 1.0a\emulator.exe" -nowindows $rombasenoext$
Then modify your script to something like this
Code:
$emuExe = $CmdLine[1]
$romName = $CmdLine[3]
HotKeySet ("{ESC}", "Terminate")
Send ( "#{F9}" ) ; disables Kodi focus in Launcher4Kodi
Runwait ($emuExe $romName)
Func Terminate ()
ProcessClose ( $emuExe )
;~ WinSetState("Kodi", "", @SW_MAXIMIZE) ; active if Kodi in windowed mode
Send ( "#{F9}" ) ; actives Kodi focus in Launcher4Kodi
Exit 0
EndFunc
I have never used Autoit or tested the code, but I think you get the idea.