sirgubster9 Posted April 4, 2022 Share Posted April 4, 2022 Have a few PC games that when you double click on the exe it brings up like a setup menu where you select resolution and controller and settings and what not, then there is a run button that you press and bam the game is going, anyway to skip this screen so it just runs the game when you select the exe file? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted April 5, 2022 Share Posted April 5, 2022 4 hours ago, sirgubster9 said: Have a few PC games that when you double click on the exe it brings up like a setup menu where you select resolution and controller and settings and what not, 1) Look in the game folders for another exe that runs the game directly. 2) Look up your game on pcgamingwiki if your game supports a command-line argument to skip the launcher. 3) Write a script to press the Run button for you. 1 Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted April 5, 2022 Author Share Posted April 5, 2022 33 minutes ago, Your Friendly A.I Overlord said: 1) Look in the game folders for another exe that runs the game directly. 2) Look up your game on pcgamingwiki if your game supports a command-line argument to skip the launcher. 3) Write a script to press the Run button for you. Thank you. I will look into the top two options. I'm hoping number 2 pans out because I have no clue how to do number 3 and I'm pretty sure number 1 doesn't exist for this game. Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted April 8, 2022 Author Share Posted April 8, 2022 On 4/4/2022 at 7:21 PM, Your Friendly A.I Overlord said: 1) Look in the game folders for another exe that runs the game directly. 2) Look up your game on pcgamingwiki if your game supports a command-line argument to skip the launcher. 3) Write a script to press the Run button for you. so sadly option 1 and 2 are a no go. Any idea how to do number 3? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted April 8, 2022 Share Posted April 8, 2022 (edited) 2 hours ago, sirgubster9 said: so sadly option 1 and 2 are a no go. Any idea how to do number 3? In short: Download AutoHotkey.zip from the AutoHotKey site. It contains a script (WindowSpy.ahk) with which you can look up window titles and button names / numbers. Drop that script on AutoHotkey.exe. The WindowSpy tool will open. Start your game and look up the window title of your game's launcher, then the button number of the "Run" button. Write a script (just a text file) that waits for the game's launcher window to open, then sends a key press to the "Run" button. (Or if the "Run" button is already highlighted when you open your game's launcher, just sends a "Space" or "Enter" key press.) Save that script as a AutoHotKey script. (With an .ahk file extension). Add that script as an additional app to your game in LaunchBox. Below I have an example for the game Trine 2: WinWait, Trine 2 Launcher WinActivate Sleep, 1000 ControlSend, Button3, {Space}, Trine 2 Launcher ExitApp - The script waits for the Trine 2 launcher window to open. - Activates the Trine 2 launcher window. (gives it focus) - Waits 1 second. - Sends a key press of the Space key to button 3 of the Trine 2 launcher window. (The '"Start Trine 2" button). - Terminates the script. If your "Run" button is already highlighted when the game's launcher is opened, you could just send a Space or Enter key press without specifying a specific button. For example: WinWait, Trine 2 Launcher WinActivate Sleep, 1000 Send {Enter} ExitApp If you want to test your script, drop your script (with an .ahk file extension) on AutoHotkey.exe. Then start your game. More information on AutoHotKey's ControlSend and Send command. *Edit* I added a screenshot about how to use AutoHotKey's Window Spy tool to look up window titles and button numbers. Edited April 8, 2022 by Your Friendly A.I Overlord 2 Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted April 9, 2022 Author Share Posted April 9, 2022 Wowzers! OK way past my skill level, but you laid it out super well. Thank you so much. I'll get started on this and come back with questions. While I'm here now the game only exits with alt f4 as far as I can find. Is there a way to add that in somehow as well. Right now all my other games end with esc which I have set to a button. Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted April 10, 2022 Share Posted April 10, 2022 15 hours ago, sirgubster9 said: While I'm here now the game only exits with alt f4 as far as I can find. Is there a way to add that in somehow as well. Can you let me know which game we're talking about? Maybe I can take a look at a script. Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted April 10, 2022 Author Share Posted April 10, 2022 8 hours ago, Your Friendly A.I Overlord said: Can you let me know which game we're talking about? Maybe I can take a look at a script. Paw patrol on a roll ha ha. For my son, and my wife just played it and said it was perfect for her too ha ha Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted April 10, 2022 Share Posted April 10, 2022 (edited) @sirgubster9 Try the following script. #NoEnv #SingleInstance SetTitleMatchMode, 3 SendMode Input SetWorkingDir %A_ScriptDir% WinWait, Paw Patrol Configuration WinActivate Sleep, 500 ControlSend, Button3, {Enter}, Paw Patrol Configuration WinWait, Paw Patrol ahk_class UnityWndClass WinWaitClose ExitApp $Esc:: { Send !{F4} } How to add the script as an additional app to your game in LaunchBox. Perhaps the easiest way: Find a location on your computer where you want to save / keep the script. As I have installed my Windows games outside of the LaunchBox folders, I keep my scripts for Windows games in the LaunchBox\Games\Windows folder. Right click somewhere in the folder --> New --> Text Document. Open the new text file in a text editor and copy / paste the script. Save --> Give your script a name and save it with an .ahk file extension. In my example I named it Paw_Patrol.ahk. Now go to the LaunchBox\ThirdParty\AutoHotkey folder and copy AutoHotkey.exe to the same location as where you keep the script. Rename AutoHotkey.exe the same as you have named your script. Like this: Now go to your game in LaunchBox --> right click --> Edit --> Edit Metadata / Media --> Additional Apps --> Add Application. - Give your additional app a name. In my case I named it Paw_Patrol. - Browse to the folder where you have Paw_Patrol.ahk and Paw_Patrol.exe. Select Paw_Patrol.exe. - Tick "Automatically Run Before Main Application". *important* Now you should be good to go. Alternatively you could compile the script to an executable and add that executable to LaunchBox as an aditional app. *Bonus* Completely hide the Paw Patrol launcher with the LaunchBox / BigBox startup screens. Use this script: #NoEnv #SingleInstance SetTitleMatchMode, 3 SendMode Input SetWorkingDir %A_ScriptDir% WinWait, Paw Patrol Configuration WinActivate Sleep, 500 ControlSend, Button3, {Enter}, Paw Patrol Configuration WinWait, Paw Patrol ahk_class UnityWndClass WinSet, Bottom, , LaunchBox Game Startup WinWaitClose ExitApp $Esc:: { Send !{F4} } Add the script to LaunchBox as described above. But for the LaunchBox / BigBox startup screens to work correctly with Paw Patrol, you must take one extra step: Right click your game --> Edit --> Edit Metadata / Media --> Startup/Pause. Tick "Override Default Startup Screen Settings" and click "Customize". Here tick: "Enable Game Startup Screen", "Enable Game Shutdown Screen" and "Hide All Windows that are not in Exclusive Fullscreen Mode." Set the Startup Load Delay slider to the time it takes to load your game. Edited April 10, 2022 by Your Friendly A.I Overlord 2 Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted April 11, 2022 Author Share Posted April 11, 2022 Dude this is amazing! Thank you so much and super thank you for the bonus option because that is exactly what I would want to do I just didn't think of it... Wow seriously thanks. I'll let you know once and if I'm successful! Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 4, 2022 Author Share Posted May 4, 2022 worked amazingly!!!! thank you so much. follow up question I wanted to also add an additional script where certain keys rgister as other keys like this? q::x w::y e::b esc::exitapp so I did that but now whenever I press esc to exit the game that hotkey keeps on running, what am I doing wrong? Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 5, 2022 Author Share Posted May 5, 2022 I was thinking maybe it's because I'm running to different ahk, but I don't know how to combine them. In the past when I have had one key convert to a different key it's been per emulator and I've been able to add it to that auto generated closing script that you guys build into launchbox, since this isn't an emulator. I'm at a loss. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 5, 2022 Share Posted May 5, 2022 14 hours ago, sirgubster9 said: I wanted to also add an additional script where certain keys rgister as other keys like this You could just add those to the above script instead of having 2. #NoEnv #SingleInstance SetTitleMatchMode, 3 SendMode Input SetWorkingDir %A_ScriptDir% WinWait, Paw Patrol Configuration WinActivate Sleep, 500 ControlSend, Button3, {Enter}, Paw Patrol Configuration WinWait, Paw Patrol ahk_class UnityWndClass WinSet, Bottom, , LaunchBox Game Startup WinWaitClose ExitApp q::x w::y e::b $Esc:: { Send !{F4} } 1 Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 5, 2022 Author Share Posted May 5, 2022 exactly what I was loooking for!!!! thank you, just didnt know where to put it if I was going to combine them. thank you 1 Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 5, 2022 Author Share Posted May 5, 2022 is there any reason why this script wouldnt close like the other one you created for me, I basically just took yours copied and pasted and added in one extra line. This one doesnt close when i close the game using ESC or using the exit to windows option on the game, what am I missing? #NoEnv #SingleInstance SetTitleMatchMode, 3 SendMode Input SetWorkingDir %A_ScriptDir% WinWait, Select Controllers WinActivate Sleep, 500 ControlSend, Button3, {Enter}, Select Controllers Sleep, 500 ControlSend, Button3, {Enter}, Select Video Mode WinWait, Mashed Game ahk_class UnityWndClass WinWaitClose ExitApp q::x w::y e::b $Esc:: { Send !{F4} } Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 5, 2022 Share Posted May 5, 2022 30 minutes ago, sirgubster9 said: is there any reason why this script wouldnt close I haven't followed exactly what you're trying to do, but try removing WinWaitClose before ExitApp. It's doubling up the WinWait right before it. Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 5, 2022 Author Share Posted May 5, 2022 5 minutes ago, JoeViking245 said: I haven't followed exactly what you're trying to do, but try removing WinWaitClose before ExitApp. It's doubling up the WinWait right before it. sadly didnt fix the issue. The AHK file still stays open. What am I missing here? I thought ESC would kill it no? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 5, 2022 Share Posted May 5, 2022 2 hours ago, sirgubster9 said: The AHK file still stays open. Now that I've read through the full post... 😊 You do need to have that WinWaitClose in there. (srry 'bout that) if the previous scripts that @Your Friendly A.I Overlord wrote for you worked as expected (including exiting properly [closing the script]) and if the hotkey reassignments with the new script I shared work, but now it's not exiting correctly... my guess is that it's not finding what you've told it to look for. WinWait, Mashed Game ahk_class UnityWndClass So what's happening is the script is still waiting [WinWait] for that to appear, so that it can then wait for it to close [WinWaitClose]... and then close itself [ExitApp]. Quote Link to comment Share on other sites More sharing options...
sirgubster9 Posted May 5, 2022 Author Share Posted May 5, 2022 21 minutes ago, JoeViking245 said: Now that I've read through the full post... 😊 You do need to have that WinWaitClose in there. (srry 'bout that) if the previous scripts that @Your Friendly A.I Overlord wrote for you worked as expected (including exiting properly [closing the script]) and if the hotkey reassignments with the new script I shared work, but now it's not exiting correctly... my guess is that it's not finding what you've told it to look for. WinWait, Mashed Game ahk_class UnityWndClass So what's happening is the script is still waiting [WinWait] for that to appear, so that it can then wait for it to close [WinWaitClose]... and then close itself [ExitApp]. Oh OK that makes sense. For my previous script the ahk file was call paw_patrol.ahk and the exe was called paw_patrol.exe. And in this new setup my ahk is called mashed_game.ahk and the exe file is called mashed_game.exe. I don't know what the class unity wind class thing is I just copied it from the previous script. The game file was paw_patrol.exe from the last one and the new game file is mashed.exe. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 5, 2022 Share Posted May 5, 2022 5 minutes ago, sirgubster9 said: the new game file is mashed.exe. I've always used the exe instead of trying to figure the class thingy. Try changing your WinWait line to WinWait, ahk_exe mashed.exe 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.