OldSkool8bit Posted July 23 Share Posted July 23 Long story short I have a bigbox version that has all my arcade games on....I could not get the sinden light gun games to work well so I bought a drive which had all of them pre-configured The gun drive has another instance of bigbox on it and I can't just simply copy it to mine as it breaks alot of the configurations. I tried creating an ahk to open up the gun bigbox.exe when I want to play gun games but I get an error that a version of bigbox is already running. I need help with an ahk that will in a sense kill the version of bigbox my arcade games are on and then open up the bigbox.exe of the drive the gun games are on. I can't figure it out and would greatly appreciate any help. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted July 23 Share Posted July 23 1 hour ago, OldSkool8bit said: I tried creating an ahk to open up the gun bigbox.exe when I want to play gun games but I get an error that a version of bigbox is already running. This is some old code I dug up. It would have been written for AHK 1.0. So if you're using 2.0, it may not work. This script assumes you just closed BigBox and then started it (this script) right away. It'll look for and then wait for the LB/BB background process to completely close. boxes := ["LaunchBox.exe", "BigBox.exe"] st := A_TickCount lp := 10000 en := st + lp Sleep 1000 while (A_Tickcount < en) { Loop % boxes.length() { if (WinExist("ahk_exe " boxes[A_Index])) { Process WaitClose, % boxes[A_Index] Break } } } ;LB/BB is done saving in the background ;add your part here that starts the other instance of BigBox ExitApp Quote Link to comment Share on other sites More sharing options...
OldSkool8bit Posted July 23 Author Share Posted July 23 @JoeViking245 thank you...Do I need to specify the drive of where the bigbox.exe is that I want to close or will it just search all drives/running programs for bigbox.exe? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted July 23 Share Posted July 23 54 minutes ago, OldSkool8bit said: @JoeViking245 thank you...Do I need to specify the drive of where the bigbox.exe is that I want to close or will it just search all drives/running programs for bigbox.exe? If you want 'this' script to close the currently running BigBox, you can just add to the top of it WinClose, ahk_exe BigBox.exe This, WinExist and WaitClose all search for the process bases on just the filename.exe. Regardless of what drive it was started from. 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.