Johnny T Posted August 5, 2020 Share Posted August 5, 2020 Anyone know of a .bat file that will simply start an exe. I want to run my Hidden Object Games but don't want to keep batch editing them to remove the emulator (as they don't use an emulator and just run natively on the PC). I thought something like: start D:\LaunchBox\Games\"Hidden Object Games"\%1\%1.exe Might work but despite trying various options.... (start /d "" path) etc... I can't get it to work. Anyone got any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
neil9000 Posted August 5, 2020 Share Posted August 5, 2020 Just import them as PC games not roms, that way a emulator isnt associated to them in the first place. Just drag and drop the .exe's onto Launchbox and choose the "none of the above" option in the wizard. This is the same way you import any file that doesnt need a emulator. Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 5, 2020 Author Share Posted August 5, 2020 5 minutes ago, neil9000 said: Just import them as PC games not roms, that way a emulator isnt associated to them in the first place. Just drag and drop the .exe's onto Launchbox and choose the "none of the above" option in the wizard. This is the same way you import any file that doesnt need a emulator. I'm an idiot. Didn't really think of that. I think I'm so used to just importing emulated games!!! Okeedokee... That's the route I'll go down. Thanks ? Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 8 hours ago, neil9000 said: Just import them as PC games not roms, that way a emulator isnt associated to them in the first place. Just drag and drop the .exe's onto Launchbox and choose the "none of the above" option in the wizard. This is the same way you import any file that doesnt need a emulator. Hi Neil Just to let you know that I sorted that but, at first, it wouldn't allow me to drag/drop. It became apparent that it was because LB was run in 'admin' mode. Once I closed down and re-ran without admin mode it worked a treat. Just posting here in case it catches someone else out (and probably to remind myself as well in the future! This brain ain't getting any younger!) Thanks again Quote Link to comment Share on other sites More sharing options...
Kiinkyfoxx Posted August 6, 2020 Share Posted August 6, 2020 (edited) 9 hours ago, Johnny T said: I'm an idiot. Didn't really think of that. I think I'm so used to just importing emulated games!!! Okeedokee... That's the route I'll go down. Thanks ? I realise this might be a tad late, but I think I also remember you asking about setting up ahk's for this type of game? By importing them as pc games I don't think you get the running ahk and exit ahk tabs that are in the edit emulator part. Attached below is a bat file that hopefully will act as a launcher for the games for you. Add an emulator, lets call it Hidden Objects for now Set the tab as below-but obviously with your pathway and not mine-and no start up screens so can watch for issues Then you can use all the other tabs in this pic-once you have tested it and it works then you can tick attempt to hide box and use start up screens. Edited August 6, 2020 by Kiinkyfoxx Removed incorrect bat file 1 Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 Mr Foxx you are a diamond!!! I had literally just opened my AHK script to see what was going on as, you are correct, after importing the games this morning my AHK script didn't work (run)!!! That's great info and you've saved a tiny bit of what little hair I have left. Really appreciate you posting that matey Quote Link to comment Share on other sites More sharing options...
Kiinkyfoxx Posted August 6, 2020 Share Posted August 6, 2020 9 minutes ago, Johnny T said: Mr Foxx you are a diamond!!! I had literally just opened my AHK script to see what was going on as, you are correct, after importing the games this morning my AHK script didn't work (run)!!! That's great info and you've saved a tiny bit of what little hair I have left. Really appreciate you posting that matey No worries, hopefully it works out the box, but I haven't been able to test it, as don't have those games, but the theory behind it should work. However if it doesn't it might be an issue with finding the correct path. In which case let me know and we can adapt it as needed, I think I may have actually over complicated it-just been thinking about it a tad more and realised that I may have got it wrong. Without trying to be patronising, if it doesn't work then add a pause line as below-as I think this will be the bit that is wrong - it might be that the %Vara% bit isn't actually needed. :LaunchEmu cd %pathway%%Vara% pause start/wait /b %game% Let us know the outcome-Cheers Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 Yep, after standing on the shoulders of giants I ended up with this in order to get a working version. set romname=%1 For %%A in (%romname%) do ( Set Pathway=%%~dpA Set Game=%%~nxA ) :LaunchEmu cd %pathway% "%game%" My hidden object games have spaces in the name of the exe so had to put the %game% in quotes. Also got rid of the echo'es as it was keeping the cmd prompt window open and refocussing on it after the game had launched. Again, a big big thank you from me for pointing me in the right direction. I wouldn't have managed without your help. Thanks Quote Link to comment Share on other sites More sharing options...
Kiinkyfoxx Posted August 6, 2020 Share Posted August 6, 2020 (edited) 3 hours ago, Johnny T said: Yep, after standing on the shoulders of giants I ended up with this in order to get a working version. set romname=%1 For %%A in (%romname%) do ( Set Pathway=%%~dpA Set Game=%%~nxA ) :LaunchEmu cd %pathway% "%game%" My hidden object games have spaces in the name of the exe so had to put the %game% in quotes. Also got rid of the echo'es as it was keeping the cmd prompt window open and refocussing on it after the game had launched. Again, a big big thank you from me for pointing me in the right direction. I wouldn't have managed without your help. Thanks The annoying thing is that is actually the bat file I use on my system ?, and ended up adapting it and adding the Vara stuff to it as I used your one at the top as a start point, and after posting it realised I didn't need to add that bit-but it gave me a morning lesson in how to do something I didn't know before it bat files so all not lost. I only put the echos is so could see what was going on- the launcher below has all the echos taken out AND will in theory stay open after loading the game so if you use start up and exit screens they will work with it. On the edit emulator tab if you put a tick in the hide emulator box at the bottom it should stop any annoying grab from the bat file happening and also will hide is so nice and clean Hidden objects launcher.bat Edited August 6, 2020 by Kiinkyfoxx replaced bat file with small correction Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 For some reason the "start/wait" command doesn't work for me?? It doesn't start the game up? However, without the start/wait it does start the game?? I'm the same as you, a combination of Google and people like yourself and I'm always learning new things. I'll continue to mess around with it and post back if I get it sorted. Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 Right... I think it's sussed now.... it certainly seems to be working fine on the brief testing I've just done.... The batch file I use is called "NO EMULATOR REQUIRED SO DUMMY BAT FILE.bat" and it contains: set romname=%1 For %%A in (%romname%) do ( Set Pathway=%%~dpA Set Game=%%~nxA ) :LaunchEmu cd %pathway% #start/wait /b "%game%" "%game%" My emulator settings are these: My "Running AutoHotKey Script" is: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance, Force #Persistent $LCtrl:: Send, {LButton} And my "Exit AutoHotKey Script" is: ExitApp And that seems to work! A massive thanks again Foxxy for your help mate Quote Link to comment Share on other sites More sharing options...
Kiinkyfoxx Posted August 6, 2020 Share Posted August 6, 2020 (edited) 39 minutes ago, Johnny T said: For some reason the "start/wait" command doesn't work for me?? It doesn't start the game up? However, without the start/wait it does start the game?? Because the %game% is in "" you might need to try the line below- there is a space between each bit-eg start{space}/wait{space}/b{space}""{space}"%game%" I think that because of the use of "" around %game% it takes that as a window title, and then doesn't actually load anything start /wait /b "" "%game%" Edited August 6, 2020 by Kiinkyfoxx Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 46 minutes ago, Kiinkyfoxx said: Because the %game% is in "" you might need to try the line below- there is a space between each bit-eg start{space}/wait{space}/b{space}""{space}"%game%" I think that because of the use of "" around %game% it takes that as a window title, and then doesn't actually load anything start /wait /b "" "%game%" Yep, adding the extra "" after /b and before "%game%" worked!! What's the difference between just having "%game%" and having start /wait /b etc ?? Cheers Quote Link to comment Share on other sites More sharing options...
Kiinkyfoxx Posted August 6, 2020 Share Posted August 6, 2020 (edited) The start /wait means that the command window stays open in the backgorund waiting for the game to close, before moving onto next command (which in this case is exit-well it would be but i am lazy and didn't bother putting it in so it auto exits) this is handy if you then want to close another programme, move any files etc after the game closes-I think it also helps with the exit screen being there when you exit the game. Some of the launchers I have cobbled together will open other programmes before/move a config file around etc before loading the actual game (Lightgun games/Demul Emulator/Some others) and I need to put them back or close them afterwards, which is why I use the same style for all my bat files, and then when that specific game that needs something closes, it will run the next commands I have added to return things to how it was before-because it's not broke so I won't fix it. the /b basically means that no new command window opens when the command is passed-just keeps it all nice and tidy if like me you are OCD and don't like having other windows, boxes etc gettting in the way and stopping LB/BB looking good. Edited August 6, 2020 by Kiinkyfoxx Quote Link to comment Share on other sites More sharing options...
Johnny T Posted August 6, 2020 Author Share Posted August 6, 2020 1 hour ago, Kiinkyfoxx said: the /b basically means that no new command window opens when the command is passed-just keeps it all nice and tidy if like me you are OCD and don't like having other windows, boxes etc gettting in the way and stopping LB/BB looking good. Thanks for the explaination! And - yes! - I am like you and OCD 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.