Jump to content
LaunchBox Community Forums

Getting a AHK file to work on a specific steam game


nutter1980

Recommended Posts

Hi all, Just setup a new arcade cabinet. I want to play Sine Mora in my steam collection. I have been manually running an AHK file to remap my keys, How do I get launchbox to run this ahk just for this one game and then close it once I exit? Any help great. SteSmile
Link to comment
Share on other sites

I thought the Steam Controller is supposed to automatically do this through Big Picture mode or something? Through LaunchBox though, yea I can see how that might be hard. In this case you may need to use a controller that doesn't simulate the keyboard, like a PS4 or Xbox One controller. I am unsure how easy this might be to pull off with the Steam Controller. You should also be able to close the game with the close buttons in the menu, so is the AHK script even required?
Link to comment
Share on other sites

SentaiBrad said I thought the Steam Controller is supposed to automatically do this through Big Picture mode or something? Through LaunchBox though, yea I can see how that might be hard. In this case you may need to use a controller that doesn't simulate the keyboard, like a PS4 or Xbox One controller. I am unsure how easy this might be to pull off with the Steam Controller. You should also be able to close the game with the close buttons in the menu, so is the AHK script even required?
Sorry sentai brad. I think you have misunderstood. I am using an arcade stick and ipac keyboard encoder . Sine Mora doesn't let you change keys within the actual game which really sucks so an ahk needs to be ran before the game starts to remap keys from ipac default which is mame to what required in the game.Wink
Link to comment
Share on other sites

Ah, ok. Steam collection, I don't know why I read Steam Controller. The I apologize! I totally did misunderstand. You might need to get AHK Standalone for this, and I don't know what script would help you in this case. Jason might be able to shed some more light on this so I'll forward this to him.
Link to comment
Share on other sites

Hi @nutter1980, unfortunately there's no way to run an AutoHotkey script for a single game, currently. The AutoHotkey stuff currently only works on a per-emulator basis. Not sure if we have a ticket for this on Bitbucket or not, but feel free to create one so we can get that implemented eventually. Sorry for the trouble.
Link to comment
Share on other sites

Jason Carr said Hi @nutter1980, unfortunately there's no way to run an AutoHotkey script for a single game, currently. The AutoHotkey stuff currently only works on a per-emulator basis. Not sure if we have a ticket for this on Bitbucket or not, but feel free to create one so we can get that implemented eventually. Sorry for the trouble.
Thanks Jason, I am new here and not sure where to log this as a ticket. Would you point me in the right direction. This would be a really helpful feature to have for games that dont allow you to change key config.
Link to comment
Share on other sites

  • 1 month later...
  • 4 years later...
  • 2 years later...

+1

For the original requestor if not already solved, you can pass a controller map file to ipac using WinIPAC as an additional app on launch (I do this for injustice)
I would still like AHK to be able to clear some games that have mandatory 'launcher' to select the resolution etc

Link to comment
Share on other sites

  • 7 months later...

I have a custom arcade with both emulator and pc games on it.

I have my esc key bound in a couple emulators AHK running script to exit the game forcefully. Retroarch handles most but ones like Sega model 2 need this hack.

I need to apply this to all steam games too, so that my friends and family don't get confused when the esc key (triggered by a stream deck button) doesn't exit the game for PC games. Otherwise they need to manually exit through the pc game's menu.

Link to comment
Share on other sites

2 hours ago, Hamburglin said:

I have a custom arcade with both emulator and pc games on it.

I have my esc key bound in a couple emulators AHK running script to exit the game forcefully. Retroarch handles most but ones like Sega model 2 need this hack.

I need to apply this to all steam games too, so that my friends and family don't get confused when the esc key (triggered by a stream deck button) doesn't exit the game for PC games. Otherwise they need to manually exit through the pc game's menu.

1)    You (they) really SHOULD be exiting those through the game's menu. 

You might be able to create a script that has your Exit routine in it and set that as an Additional App to the Steam games.

Otherwise refer to item 1.  You might need to help the 2-year-olds with that, but anyone over 5 can figure it out.  ;) 

Link to comment
Share on other sites

I'm fairly familiar with OS's and filesystems. None of the games they'd be playing hold long term game data. In the incredibly small chance there is ever corruption, the games can be reinstalled.

I'm going for usability and consistency here (critical in the design of apps and games for your customers) and will look around for solutions! Maybe additional apps on  per game basis will work.

Edited by Hamburglin
Link to comment
Share on other sites

11 minutes ago, Hamburglin said:

Maybe additional apps on  per game basis will work.

If you don't have AutoHotkey installed on your system, you can make use of the one that comes with LB (link is to a specific post within that topic).

Send Alt + Enter to a .Lnk shortcut? - Noobs - LaunchBox Community Forums (launchbox-app.com)

 

You'll need to make a different script for each game as the exe's are each different.  i.e.

$Esc::
   WinClose, ahk_exe mySteamGame.exe
   ExitApp

 

You could make 1 generic one that will close the "active" window.  The risk is, if they start a [Steam] game and somehow set focus to another window and press Escape, the 'another' window will get closed.

$Esc::
  WinClose A
  ExitApp

If you do go this route, you can then add this Additional App (set to Run Before) to all your Steam games at once using this plugin:

 

Link to comment
Share on other sites

In th ahk scripts for exiting emulators like sega model 2, the code references a variable of the current emulator. It does not literally say "exit segamodel2.exe". 

Somehow, launchbox has a variable stored of the emulator that launched and can access that via ahk in its running script to kill it.

Edited by Hamburglin
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...