The Papaw Posted May 21, 2022 Share Posted May 21, 2022 I created a batch file to kill LB, just curious if this is a safe way to do it or will I end up with corrupted files over time. This is what I am using: @echo off taskkill /im LaunchBox.exe It appears to be working okay with the few tests I've done, including saving the backups. If there is a safer way, please do share. Quote Link to comment Share on other sites More sharing options...
neil9000 Posted May 21, 2022 Share Posted May 21, 2022 (edited) 24 minutes ago, The Papaw said: I created a batch file to kill LB, just curious if this is a safe way to do it or will I end up with corrupted files over time. This is what I am using: @echo off taskkill /im LaunchBox.exe It appears to be working okay with the few tests I've done, including saving the backups. If there is a safer way, please do share. Launchbox writes files after you close it via its x on the window. Task killing it i assume id doing just that, unsafely closing launchbox, meaning it cant write files at close, like newly added or edited games for example. Edited May 21, 2022 by neil9000 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 21, 2022 Author Share Posted May 21, 2022 6 minutes ago, neil9000 said: Launchbox writes files after you close it via its x on the window. Task killing it i assume id doing just that, unsafely closing launchbox, meaning it cant write files at close, like newly added or edited games for example. Thanks @neil9000 Here is what I am up too. My master Launchbox rig is getting pretty large and most themes are really dragging now on the slower PC's around the house. I am thinking about making multiple instances of LB on them, say one for just Arcade, another for the older platforms and maybe another for the more modern platforms, then creating a batch file or maybe some type of Windows app in virtual studio or something to run first, allowing the user to pick the one they want, then when they exit it, take them back to the app or bat file to change to a different one. Even thought about just creating one instance of LB to run first with only the different instances of LB and let it run the batch files to kill and re-open the different instance???? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 21, 2022 Share Posted May 21, 2022 Sounds like what you want is a "LaunchBox Menu" of sorts. You run the program, which brings up a 'menu': LaunchBox Arcade LaunchBox Classics LaunchBox Modern Exit You click one of those LB options. Then when you exit LB, the menu reappears. The verdict is out regarding TaskKill. It's definitely bad if you add the /F parameter which will Force Kill the program. But I can't really find anything saying that running without /F is as safe as: painstakingly placing your hand on your mouse, sliding it with all-your-might to move the pointer all-the-way up to the upper right corner where the "X" is, and forcing your index finger to push down the left mouse button to "click the X". I think you'd be best off with a menu type thing. That can be made using a batch file, AHK script or Visual Studio. Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 21, 2022 Author Share Posted May 21, 2022 10 minutes ago, JoeViking245 said: Sounds like what you want is a "LaunchBox Menu" of sorts. You run the program, which brings up a 'menu': LaunchBox Arcade LaunchBox Classics LaunchBox Modern Exit You click one of those LB options. Then when you exit LB, the menu reappears. The verdict is out regarding TaskKill. It's definitely bad if you add the /F parameter which will Force Kill the program. But I can't really find anything saying that running without /F is as safe as: painstakingly placing your hand on your mouse, sliding it with all-your-might to move the pointer all-the-way up to the upper right corner where the "X" is, and forcing your index finger to push down the left mouse button to "click the X". I think you'd be best off with a menu type thing. That can be made using a batch file, AHK script or Visual Studio. Yes Sir, that is exactly what I am gonna be trying to do. I don't see a reason to use the /f switch as it LB appears to be closing well (at least with v12.12, I know these things may change with updates sometimes) Something I am not sure about is when LB/BB is opened, then closed, then re-opened again, it tends to run a bit slower if the PC isn't re-booted for some reason. Like maybe memory isn't cleared 100% from the previous run or something. Could be a windows thing, I really don't know. I think I can pull it off with bat or AHK I was wondering if something in Visual Studio or even something else might work and look better if you create it with a cool icon and make it an exe or something? Rather than having 5-10 script files. But never done anything with VS before. I assume you would use some type of invoke in it?? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 21, 2022 Share Posted May 21, 2022 With a batch or ahk, you'll only need ever one (script) file. VS (once compiled) will be only 1 file. As far as files being an exe, you can convert ahk to exe, and .bat to .com (I think. It's been a while), .cmd or even convert it to a PowerShell file. Speaking of which, PowerShell is another language you can look into. But there's really no need to shoot for a specific executable file type. Create a shortcut to your completed file and you're done. 39 minutes ago, The Papaw said: I was wondering if something in Visual Studio or even something else might work and look better Rhetorical question? A batch file can be somewhat generic (Sample here) Or a little more elaborate (Sample here) [can probably add icon/images somehow as well] AHK of course can do this as well. (a very generic "game menu") But it will all depend on your comfort level with either one of these and your ability to research. Visual Studio has a learning curve of its own. But again, if you can do a google search, you can find out how to do what you're wanting. Though you may need a little ingenuity and a lot of patience. But the answers are all out there. 2 versions of LB. Mess emu (ol' school). MAME emu. Also includes links to their respective folders plus 4 others. Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 23, 2022 Author Share Posted May 23, 2022 On 5/21/2022 at 11:50 AM, JoeViking245 said: With a batch or ahk, you'll only need ever one (script) file. VS (once compiled) will be only 1 file. As far as files being an exe, you can convert ahk to exe, and .bat to .com (I think. It's been a while), .cmd or even convert it to a PowerShell file. Speaking of which, PowerShell is another language you can look into. But there's really no need to shoot for a specific executable file type. Create a shortcut to your completed file and you're done. Rhetorical question? AHK of course can do this as well. (a very generic "game menu") respective folders plus 4 others. I've gotten busy and just getting back to playing with this. Been tinkering with AHK a bit this morning. Looking for a way to add an image to each menu now if you can, never tried before Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 23, 2022 Share Posted May 23, 2022 46 minutes ago, The Papaw said: Looking for a way to add an image to each menu now I never tried before in AHK either. This should get you started. "ahk add image to menu gui" When you test the guys script with your own .bmp image, you may need to change line #14. (remove the plus ( + ) symbol) ;before Gui, Show, +Hide, Menu Bitmaps ;after Gui, Show, Hide, Menu Bitmaps Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 23, 2022 Author Share Posted May 23, 2022 (edited) 1 hour ago, JoeViking245 said: I never tried before in AHK either. This should get you started. "ahk add image to menu gui" When you test the guys script with your own .bmp image, you may need to change line #14. (remove the plus ( + ) symbol) I got some png's working in it, now I am trying to figure out how to make them clickable, something to do with a "A g-label such as gMySubroutine may be listed in the control's options. This would cause the MySubroutine label to be launched automatically whenever the user clicks the picture.". -quoted from autohotkey.com Just getting things going, and I will probably find different images and maybe change layout, maybe 2 x 2 square instead of single line, maybe get rid of the buttons once I figure out how to make the images clickable???? Here is what I got so far: Edited May 23, 2022 by The Papaw Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 23, 2022 Share Posted May 23, 2022 "ahk gui click image to run application" Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 23, 2022 Author Share Posted May 23, 2022 I'm making progress (one of the few youtube videos that is actually not affiliate crap yet.. ) and got one clickable, also found an old program to make AHK GUI's called SmartGUI. I might see what is does. Here's a copy of of it if you're interested in playing with it. smartgui.zip 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 23, 2022 Share Posted May 23, 2022 1 hour ago, The Papaw said: SmartGUI I've used that before. It's a little weird at very 1st to figure what you're doing. But then seems ok. The last suggested search I gave, 1st hit shows pretty easily how to have a clickable image. Can even set it up to distinguish between Left, Middle and Right clicks. 1 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 23, 2022 Author Share Posted May 23, 2022 I've got it all working pretty good now, doing artwork and layout. Will post screenshot when I get it done. Thanks for all the tips. I had done got on a roll before trying the program , will look at it later.. 1 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 24, 2022 Author Share Posted May 24, 2022 Here is want I wound up with (still tweaking). I had no idea you could do so much as easily as you can with AHK. Definitely will be using much more in the future. Thanks again Joe for the support The Menu: Showing a confirmation prompt: 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 24, 2022 Share Posted May 24, 2022 Nicely done! 1 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted May 25, 2022 Author Share Posted May 25, 2022 (edited) Posted copy here for others to play with: The Game Zone.ahk Edited May 25, 2022 by The Papaw 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.