DerHof2007 Posted February 12, 2017 Share Posted February 12, 2017 I need to use AHK files to redirect buttons for my Commodore 64 games. In Hyperspin there was a folder for this in profiles for each emulator that needed to use them. Where would I find this in LaunchBox? How do I enable this option... where do I put the AHK files? Does it work the same here.... example for game 1 if I needed the Z button in my cabinet to act as a D and the X an F then I make an AHK file called game 1 and the full contents of the file would be... z::d x::f Quote Link to comment Share on other sites More sharing options...
DOS76 Posted February 12, 2017 Share Posted February 12, 2017 I don't know about the AHK part but I do know that @Zombeaveris an avid C64 fan so maybe he knows away to config the buttons how you would like either with or without AHK Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 12, 2017 Author Share Posted February 12, 2017 Sweet... I'm sure he'll chime in. Although it practically impossible to do many C64 games without a keyboard I can set a lot of them up this way. I'm using Winvice by the way if that'll make a difference for alternate options. Quote Link to comment Share on other sites More sharing options...
DOS76 Posted February 12, 2017 Share Posted February 12, 2017 On 2nd thought if it requires a keyboard he probably just uses his keyboard so he may not be able to shed much light on this Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 12, 2017 Author Share Posted February 12, 2017 Yeah, I'm running from a cabinet so I try to avoid the keyboard when I can. But LB does support AHK so someone has to know something... Quote Link to comment Share on other sites More sharing options...
DOS76 Posted February 12, 2017 Share Posted February 12, 2017 Yeah there are people here that know AHK pretty well. Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 12, 2017 Share Posted February 12, 2017 Yeah I can't say as this is something I've ever actually done. I've always got a keyboard nearby, whether on my PC or streaming to my Steam Link, so I've never needed to do this. It should be possible though. In order to do this on a game by game basis you'll probably need to use the Additional Application feature. You can right-click on a game in your library, go to Edit, and then go to the Additional Application tab and select "Add Application...". Here you could direct it to an AHK script that will change the buttons as needed, and then check the "Automatically Run Before Main Application Box". This will make the script (or whatever else you add as an application) run just before starting the game/emulator. You could then add another Additional Application that would close/unload the script you started and tell it to "Automatically Run After Main Application". This is predicated on you knowing how to actually write the scripts you need, but it sounds like you already know how to do that. Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 12, 2017 Author Share Posted February 12, 2017 Ok, but how would I direct it to the game specific AHK file... would that be in the 'Application Command-Line Parameters:' Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 12, 2017 Share Posted February 12, 2017 Don't direct it to AutoHotkey itself, direct it to the AHK file. Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 12, 2017 Author Share Posted February 12, 2017 Didn't work... I'd love to keep messing with this but I have to go somewhere and wont be back for almost 10 hours... if you have any other thoughts please let me know. Thank you! Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 12, 2017 Share Posted February 12, 2017 Then there's probably a problem with your script(s) which isn't something I can really help with. Maybe @ckp or somebody with more AHK knowledge can assist. Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 12, 2017 Share Posted February 12, 2017 One additional thought - are .AHK files actually associated (always open with) AutoHotkey on your computer? I assumed they would be but it won't work otherwise, not unless you setup the additional application to direct the script to AutoHotkey.exe though command line parameters. Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 12, 2017 Author Share Posted February 12, 2017 Running out the door as soon as I type this... As far as the script is concerned it definitely works with Hyperspin so I assume it would work with LB as well. But as for you last post maybe I need to direct it to the AHK.exe file first then the game specific file next. I'll give it a shot tonight. Thanks again. Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 13, 2017 Author Share Posted February 13, 2017 Checked my file associations. AHK files were associated with Notepad. I had to download AutoHotKey and install. It now works perfectly just directing to the file related to the game. Thank you much!! Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 13, 2017 Share Posted February 13, 2017 Good deal! Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 13, 2017 Author Share Posted February 13, 2017 On another note... just tried something a little different. Don't know if anyone would have a use for it but I may. You can use multiple AHK files at once. As a quick test I simply put the two commands I listed above into 2 separate files and loaded them both and it worked the same. The reason I may use something like this is using specific strings of key for multiple games like the function buttons or multiple numbers and such as can be required in many C64 games. Where I may need to only have a a few commands for actual game play but a bunch of utility/pre-game buttons. I can have a separate file for that and then another for the actual game use buttons. I may or may not set things up like this but good to know I have that option. Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 13, 2017 Share Posted February 13, 2017 So I take it in that scenario you've got two separate Additional Applications, both set to run "before main application"? I've never actually tried that. Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 13, 2017 Author Share Posted February 13, 2017 That is correct.... I would assume you can have as many as necessary. Quote Link to comment Share on other sites More sharing options...
Zombeaver Posted February 13, 2017 Share Posted February 13, 2017 Interesting. I've never had a specific need for it, but I'm glad to know it works should the niche need arise Quote Link to comment Share on other sites More sharing options...
DerHof2007 Posted February 13, 2017 Author Share Posted February 13, 2017 You never know what you'll need in this hobby, LOL. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.