Jump to content
LaunchBox Community Forums

Close a Startup app when Launchbox/Bigbox close


Recommended Posts

hello guys , do you know how can I close the app Xpadder when Bigbox/Launchbox close?

I know how to run it at the startup but not when they close. Do I need a batch file or a specific command parameter?

Hope you can help me, 

Thank you so much

Link to comment
Share on other sites

Here's one way you can do it:

Create an AutoHotkey script and save the file [somewhere] as KillXpadderAfterLB-BBcloses.ahk.  (you can name the file whatever you want, as long as it has the file extension .ahk.  Just be sure that it doesn't save as filename.ahk.txt)

The script is just a text file with the .ahk file extension.  In the script, put:

boxes := ["LaunchBox.exe", "BigBox.exe"]

Sleep 10000
Loop % boxes.length() 
{
   if (WinExist("ahk_exe " boxes[A_Index])) 
   {
      Process WaitClose, % boxes[A_Index]
      Process, Close, "Xpadder.exe"
      Break
    }
}
ExitApp

 

In LaunchBox, go to ToolsOptionsStartup Applications.  Click Add Application.

For the Application Path, navigate to and select:  /LaunchBox/ThirdParty/AutoHotkey/AutoHotkey.exe

For the Command Line Parameters, put (inside of quotes) the full path to the file you created above.

i.e.  "D:\Misc\KillXpadderAfterLB-BBcloses.ahk"

This works for both LaunchBox and BigBox.  So select Start With Both.

Click OK to save and close.

image.thumb.png.9fc441791ddc4a92a1b8d2c955d090fc.png

Restart LaunchBox for it to take affect.

 

Note:   I don't use Xpadder, but I'm pretty sure the 'Process, Close' method is how it gets shutdown.

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...