LuismaSP89 Posted November 22, 2018 Share Posted November 22, 2018 Hi! I don´t know if somebody can help me. I need to launch a .bat before my emulator starts (I know that I can do this with additional apps, but I need to do this for around 3000 roms, so, it´s crazy to enable an additional app for one to one of them) So, I decided to do with the autohotkey feature. I use the: run, "path\myexecutable.bat" but this .bat copies some archives, and I need 2-3 seconds in order to finish the copy before the emulator is launched. The problem here is that the emulator launches immediately, so, the .bat have not finished before the emulator is launched. I tried with sleep command, but it doesn´t work, I don´t know if maybe there´s some loop that I can do or something. Any ideas? Quote Link to comment Share on other sites More sharing options...
jayjay Posted November 22, 2018 Share Posted November 22, 2018 (edited) Download and install autohotkey. Open the directory that has the emulator your using. Right click anywhere within that directory, select new, autohotkey script. Rename the script to whatever you want, right click on it and edit with notepad. Underneath the lines that are already there, copy and paste the following: EmuVar = %1% %2% %3% %4% %5% sleep, 3000 Run Emulator.exe "%EmuVar%" Exitapp sleep 3000 is for 3 seconds, 2000 would be 2 seconds and so on. In this script change Emulator.exe to whatever emulator you are using. Save it. Right click on the script and compile. In launchbox... Go to tools, manage emulators. Select the emulator your using. Leave all settings the same but point the "emulator application path" to the compiled script. Run a game and hope for the best. Edited November 22, 2018 by jayjay Quote Link to comment Share on other sites More sharing options...
LuismaSP89 Posted November 22, 2018 Author Share Posted November 22, 2018 Thanks a lot for your reply, it works Ok, but I have 2 problems. First of all, I need to use /fullscreen parameter in the emulator, but if I edit the script to add: Run "Emulator.exe /fullscreen" it doesn´t work. If I put the parameter in his own section of the emulator "Default Command-Line Parameters box" showns me an error because the /fullscreen parameter can´t do nothing with the script.ahk The second problem is that the autohotkey must be installed all the time, If I install, make the script, and uninstall, it doesn´t work anymore, I like launchbox because of his portability, and I don´t want this script depends of installing some other software. Quote Link to comment Share on other sites More sharing options...
jayjay Posted November 23, 2018 Share Posted November 23, 2018 run Emulator.exe "%EmuVar%" /fullscreen replace with this line in the script. ahk is portable. but for what you want here, passing arguments etc, get crazy errors. i can only get something like this to work with compiled scripts. you can achieve the same thing with a .bat but your get the command window. i dont know if using a bat to exe converter with invisibility will hide the window. @echo off timeout 3 cd %~dp0 start emulator.exe %1 /fullscreen or your have to wait for jason to expand on the additional apps, it might take a while though. its low on the poll. other than that im out of ideas. Quote Link to comment Share on other sites More sharing options...
LuismaSP89 Posted November 23, 2018 Author Share Posted November 23, 2018 Sadly it doesn´t work. I talked with Lordmonkus and he says the same than you, we need to wait until Jason creates the additional apps bulk edit. Btw, thanks a lot for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.