TheRealUnderhill Posted December 10, 2020 Share Posted December 10, 2020 (edited) I seem to be having a different problem when trying to run additional apps than what I've been able to find on the forums I'm going into LB and selecting game > edit >additional apps for this. JoyToKey and "Automatically Run Before Main Application" is working and starting it just fine. Then I have a JoyToKeyclose.bat file and checked "Automatically Run After Main Application". What happens is that it is not waiting for for Daphne to close before it runs so I get JoyToKey to load but then immediately the .bat shuts it down. The testing I've done shows that it's just not waiting. I can uncheck the "run after" and JoyToKey remains loaded and running like it should. I can also run the JoyToKeyclose.bat manually after I close the game and it shuts it down like it's supposed to. This is both in LB and BB. Using BB I can go to additional apps and close it after I leave the game but where it gets frustrating is that while JoyToKey is running it causes BB controls to be overly sensitive. Even with a quick tap on the joystick or d-pad most often jumps a couple selections. Makes it difficult to choose the additional apps option in BB most of the time. I'm dealing with it but I was hoping there is something simple I am overlooking that's causing my issue. This is my start line from my daphnebatch.bat that I use to start Daphne inside LB. Could the /b switch be causing it to think it shut down? I looked everywhere and I just can't seem to find an answer. I'd love any thoughts or ideas on this. Thanks! start /b daphne.exe %1 vldp -framefile vldp_dl\%1\%1.txt -blend -ignore_aspect_ratio -blank_searches -min_seek_delay 1000 -seek_frames_per_ms 20 -homedir . -fastboot%bank% -nocrc -noissues -noserversend -sound_buffer 2048 -fullscreen -x 1920 -y 1080 Edited December 10, 2020 by TheRealUnderhill Solved! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 10, 2020 Share Posted December 10, 2020 12 hours ago, TheRealUnderhill said: Could the /b switch be causing it to think it shut down? Yes. LaunchBox sees the [Daphne] batch file 'exit', so then runs the Run After Main Application. Try a "wait" instead of "exit". @echo off start /w "" daphne.exe %1 vldp -framefile vldp_dl\%1\%1.txt -blend -ignore_aspect_ratio -blank_searches -min_seek_delay 1000 -seek_frames_per_ms 20 -homedir . -fastboot%bank% -nocrc -noissues -noserversend -sound_buffer 2048 -fullscreen -x 1920 -y 1080 This way, the batch file will 'hang around' until Daphne exits, and THEN close itself. Alerting LB to execute the Run After Main Application app. (note the pair of Double-Quotes after /w) In fact, you could eliminate the "Run After" batch file altogether by putting its' code after the "Start /w" line. (if you wanted to) Quote Link to comment Share on other sites More sharing options...
TheRealUnderhill Posted December 10, 2020 Author Share Posted December 10, 2020 (edited) Thank you! Worked perfectly. I did just that. Added the code from the "run after" to the Daphnebatch file and removed the run after batch file. Cheers! ? I could have sworn I tried /w without the /b and it would just hang on the command box while the game started in the background. That was my whole point of using the /b. Then when I added a /w it would nullify the /b and hang again. Maybe I forgot the "". Guess that was the one thing I skipped over. Thank you again! Made my day. Edited December 10, 2020 by TheRealUnderhill 1 Quote Link to comment Share on other sites More sharing options...
Sbaby Posted August 22 Share Posted August 22 (edited) On 12/10/2020 at 2:02 PM, JoeViking245 said: I tried searching and found this post. why do add-on apps have a 30 second timeout? and then start my game before the app closes? how can i remove this timeout? I did a simple test by inserting this ahk as an add-on app and setting it to start before the game and waiting for it to exit. space:: msgbox ciao exitapp I started the game and did nothing for 30 seconds, game starts leaving the script active, it doesn't make sense and creates a big confusion with everything, if it has to wait for the app to exit for what reason does it launch ? help me solve this problem please. Edited August 22 by Sbaby Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 22 Share Posted August 22 1 hour ago, Sbaby said: why do add-on apps have a 30 second timeout? and then start my game before the app closes? how can i remove this timeout? Check Wait for Exit. This will have the game-launch wait until your Run Before additional app exits. Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted August 22 Share Posted August 22 I too have noticed this, but I didn't think of it as a bug. I assumed it is a fail safe. If said additional app gets hung up for one reason or another, the game will never launch and stay stuck in that status until further user intervention. The current implementation at least lets the game start booting if additional app took longer than 30 secs to do its thing. The workaround is scripting. If your additional app needs to be doing stuff for 30+ secs before booting the game, then the game itself will need to be launched from the script too. So, essentially no additional app would be needed. And instead, the single script will need to be the ROM/application path for the entry. Said script will need to launch whatever was your additional app, use some wait or sleep commands, or some equivalent, and then run the game. I think what you are speaking about is unrelated to the original post despite the title suggesting it does. The OP simply did not configure their approach appropriately, their script wasn't doing what they thought it was. You on the other hand did configure your approach appropriately, but due to the fail safe implemented as it currently is, doesn't actually execute as you would have thought it should. I'd say it's a legit complaint to bring up to the dev team. 14 minutes ago, JoeViking245 said: Check Wait for Exit. This will have the game-launch wait until your Run Before additional app exits. There appears to be a timeout on "Wait for Exit" though. I interpret this as they do not want the timeout to occur. Sbaby did use this checkbox. 1 hour ago, Sbaby said: setting it to start before the game and waiting for it to exit. I noticed this myself a few months ago when I added an additional app script with some bogus code (mistakes on my end). The script didn't run as intended, staying open indefinitely, but the game launches about 30 secs later regardless of the script actually exiting. Script was still running and game would be considered to have launched prematurely if we take "Wait for Exit" at a literal face value. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted August 22 Share Posted August 22 1 hour ago, JoeViking245 said: Check Wait for Exit. This will have the game-launch wait until your Run Before additional app exits. yes, the configuration is correct 1 hour ago, skizzosjt said: I too have noticed this, but I didn't think of it as a bug. I assumed it is a fail safe. If said additional app gets hung up for one reason or another, the game will never launch and stay stuck in that status until further user intervention. The current implementation at least lets the game start booting if additional app took longer than 30 secs to do its thing. The workaround is scripting. If your additional app needs to be doing stuff for 30+ secs before booting the game, then the game itself will need to be launched from the script too. So, essentially no additional app would be needed. And instead, the single script will need to be the ROM/application path for the entry. Said script will need to launch whatever was your additional app, use some wait or sleep commands, or some equivalent, and then run the game. The 30-second precautionary measure is valid and represents an effective solution. However, the issue arises when a user, like myself, is unaware of this function and develops scripts without including this variable. In my opinion, after the 30 seconds, the application should launch as expected, but it is also necessary to force the closure of the additional application; otherwise, it remains active and can cause in-game issues. Now that I am aware of this function, I will create specific scripts to manage it, but I believe it would be appropriate to include a notification to inform all users. Anyway, I also often use alternative methods with AHK scripts, but in some cases, I prefer to use additional applications. 1 hour ago, skizzosjt said: I think what you are speaking about is unrelated to the original post despite the title suggesting it does. The OP simply did not configure their approach appropriately, their script wasn't doing what they thought it was. You on the other hand did configure your approach appropriately, but due to the fail safe implemented as it currently is, doesn't actually execute as you would have thought it should. I'd say it's a legit complaint to bring up to the dev team. am sorry if I did not choose the correct post. Sorry thanks for the support Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted August 22 Share Posted August 22 7 minutes ago, Sbaby said: am sorry if I did not choose the correct post. Sorry lol sorry not needed! I'm sorry now lol. that's not what I meant to imply! wanted to make sure it was understood that the original post was really user error, but your post was about the feature not really working as expected and could be considered a bug looking at it from the angle of not considering it could be a fail safe. You scratching your head about this proves it could use some clarification in the program. Not everyone will interpret it the same and can be frustrating when interpreted different than the devs intended. I agree a tool tip or some notification method to communicate to users that there is a built in timeout would be helpful! So in the end, your post was more appropriate for the thread title than the original posters post 1 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.