Jump to content
LaunchBox Community Forums

AHK Clarification


Gildahl

Recommended Posts

I'm new with LB/BB.  In the emulator configuration, there are two tabs.  One is for Running AHK script and another is for Exiting AHK script.  I was assuming the first was executed when the emulator is started, and the second is executed when the emulator exists.  Since it doesn't appear to be working that way for me, I was wondering if someone could explain how it really works (especially the Exit script).  Thanks!

Link to comment
Share on other sites

28 minutes ago, Gildahl said:

I'm new with LB/BB.  In the emulator configuration, there are two tabs.  One is for Running AHK script and another is for Exiting AHK script.  I was assuming the first was executed when the emulator is started, and the second is executed when the emulator exists.  Since it doesn't appear to be working that way for me, I was wondering if someone could explain how it really works (especially the Exit script).  Thanks!

The running script is where you would put an AHK to exit an emulator if needed. The Exiting AHK, I believe, is for the Pause Menu exit item. 

What emulator are you trying to use an AHK on? Also, how are you trying to get it to exit? (Post the script you are using). 

Link to comment
Share on other sites

I use Ultimarc WinIPac and Ultrasticks.  I have profiles for BigBox, and a separate profile for vanilla MAME, and often for specific games.

When I startup BB, I have an AHK script that loads the stick and cp profiles for BB then launches BB.  This works.

I put a script in the "Running" script window for MAME that loads my vanilla MAME stick and cp profiles.  This works.

I put a script in the "Exit" script window for MAME that reloads my BB profiles.  My hope was that this would run when I exit a game.  This does not work.

That's basically where I am at the moment.

 

Link to comment
Share on other sites

10 minutes ago, Gildahl said:

I use Ultimarc WinIPac and Ultrasticks.  I have profiles for BigBox, and a separate profile for vanilla MAME, and often for specific games.

When I startup BB, I have an AHK script that loads the stick and cp profiles for BB then launches BB.  This works.

I put a script in the "Running" script window for MAME that loads my vanilla MAME stick and cp profiles.  This works.

I put a script in the "Exit" script window for MAME that reloads my BB profiles.  My hope was that this would run when I exit a game.  This does not work.

That's basically where I am at the moment.

 

So on exit you are looking to have that loaded profile close and then reload the profile specific for moving in BigBox exit correct?

This is not working likely the Exit AHK tab in the edit emulator is for the exit hook command (closing an emulator/game) when using the exit option in the Pause Menu. I may not be able to run AHK at exit to close out a profile. I am not sure how that would be done as I do not have experience using Ultimarc and loading specific profiles. 

 

Link to comment
Share on other sites

Huh.  Guess I'm a little disappointed.  What I really need is a way to run a script on start of game and another on exit of game...and what would be even more enormously helpful, would be the ability to feed the name of the game rom to these as a parameter.  Just wishful thinking?

Edited by Gildahl
Link to comment
Share on other sites

4 minutes ago, Gildahl said:

Huh.  Guess I'm a little disappointed.  What I really need is a way to run a script on start of game and another on exit of game...and what would be even more enormously helpful, would be the ability to feed the name of the game rom to these as a parameter.  Just wishful thinking?

 

Yes, for now you would have to do it per game as an additional application. Unfortunately some things are still to be developed. It is only a one man show developing Launchbox. 

Link to comment
Share on other sites

3 minutes ago, Gildahl said:

Huh.  Guess I'm a little disappointed.  What I really need is a way to run a script on start of game and another on exit of game...and what would be even more enormously helpful, would be the ability to feed the name of the game rom to these as a parameter.  Just wishful thinking

If you created it as a batch file you could run it as a additional app i think.

image.thumb.png.146fc5a0565e929007504d0c96479dfc.png

Link to comment
Share on other sites

3 minutes ago, JoeViking245 said:

Since you can load a profile before a game starts under Running AutoHotKey Script in Edit Emulator, try adding something below what you have like 


Process,WaitClose,mame64.exe	
MsgBox,,, hello world

Of course replacing the Hello World line with your  Load_BB_Controller_Profile_Command_Line.

That sounds like a reasonable approach.  I should be able to give it a try tonight.  Thanks.

Link to comment
Share on other sites

On ‎7‎/‎15‎/‎2019 at 2:16 PM, Retro808 said:

So on exit you are looking to have that loaded profile close and then reload the profile specific for moving in BigBox exit correct?

This is not working likely the Exit AHK tab in the edit emulator is for the exit hook command (closing an emulator/game) when using the exit option in the Pause Menu. I may not be able to run AHK at exit to close out a profile. I am not sure how that would be done as I do not have experience using Ultimarc and loading specific profiles. 

 

Can someone explain *exactly* when the "Exit AutoHotKey Script" is fired?  For example, if I put a simple SoundBeep command in the "Running AutoHotKey Script" tab, I hear the beep whenever the emulator is started.  However, if I put a SoundBeep command in the "Exit Autohotkey Script" tab, I haven't yet been able to hear the beep--even when using the Exit option within the Pause menu.  This tab must have a purpose.

Edited by Gildahl
Link to comment
Share on other sites

2 hours ago, Gildahl said:

Can someone explain *exactly* when the "Exit AutoHotKey Script" is fired?  For example, if I put a simple SoundBeep command in the "Running AutoHotKey Script" tab, I hear the beep whenever the emulator is started.  However, if I put a SoundBeep command in the "Exit Autohotkey Script" tab, I haven't yet been able to hear the beep--even when using the Exit option within the Pause menu.  This tab must have a purpose.

The "Exit AHK Script" is only for exiting the game/emulator from within the BigBox Pause Screen. So the script will only affect that. 

Standard exit scripts to close out an emulator, if one is needed, would go in the Running AHK tab. 

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