Jump to content
LaunchBox Community Forums

AHK to switch between 2 bigbox versions


OldSkool8bit

Recommended Posts

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...