Jump to content
LaunchBox Community Forums

Run after main application (Additional apps)


DarkanParx

Recommended Posts

Hello everyone,

I'm recently running into an issue since the latest update, I'm wondering if it's only me having this problem. Basically I have a game set to run an additional app before startup. The additional app starts correctly before launching the game (a steam game). I have an ahk script set to run after the application to close this additional app, however when I exit the game it doesn't run. I'm sure the script is working because if I try to run it manually it successfully closes the app. I even tried making a bat file to run the ahk script, but doesn't work either. Any idea what could be the problem? Thanks 

Edited by DarkanParx
Link to comment
Share on other sites

7 minutes ago, DarkanParx said:

Any idea what could be the problem?

Nothing (in this case) should have changed since the latest update.  When you launch a Steam game, it actually starts the Steam Launcher which then launches the actual game.  LaunchBox 'sees' the Launcher as "the game".  Then after the Launcher starts the game, it closes (and the game continues).  Now that the Launcher (aka "the game") is closed, LB executes the Run After Main Application app.

Or at least it's supposed to execute the Run After... at that point.  From the sounds of it, it's not even doing that (if it's still running when you do actually quit the game).

This all assumes you're [actual] game is being launched using the Steam ID (vs. pointing to a 'game_name.exe')

image.png.aee7f48d90dc86ee6fa1556ab8ba186b.png

Link to comment
Share on other sites

I guess this could be the issue since before I was launching an .exe and afterwards I used the steam id. However if that's the case,like you suggest, it should run the "after" app almost instantly but it doesn't seem to happen. Or maybe it happens so fast that actually the app hasn't started yet when the script tries to close it. I have to investigate, anyhow thanks for your input.

  • Like 1
Link to comment
Share on other sites

13 minutes ago, DarkanParx said:

Or maybe it happens so fast that actually the app hasn't started yet when the script tries to close it. I have to investigate

My guess is that this is correct. If I'm not mistaken LaunchBox is using AutoHotkey internally for launching games. Executing a steam url in a script takes perhaps 10 ms.

1 hour ago, DarkanParx said:

I have an ahk script set to run after the application to close this additional app

Maybe you could change or edit the script to display a message box. This gives a visual indication when something is executed. For example:

msgbox Closing App

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Your Friendly A.I Overlord said:

My guess is that this is correct. If I'm not mistaken LaunchBox is using AutoHotkey internally for launching games. Executing a steam url in a script takes perhaps 10 ms.

Maybe you could change or edit the script to display a message box. This gives a visual indication when something is executed. For example:

msgbox Closing App

 

great suggestion about adding in MsgBox at points in the script! I make use of this too! It's a great way to make sure you have your scripts executing as you intended.

 

 

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