thefritz11 Posted March 11, 2022 Share Posted March 11, 2022 17 minutes ago, pina said: Wauw, I really have to dig very deep to answer you... Let me find out first myself because it's been almost 2 years... 😆 LOL, sorry. I still haven't found a way to do this yet. Ie. have wiimote work as light gun in Dolphin for wii games and Mame. Can't justify any other purchases as the moment to improve light gun play so hoping this can get me through for a bit. Quote Link to comment Share on other sites More sharing options...
pina Posted March 11, 2022 Author Share Posted March 11, 2022 (edited) 1 hour ago, thefritz11 said: LOL, sorry. I still haven't found a way to do this yet. Ie. have wiimote work as light gun in Dolphin for wii games and Mame. Can't justify any other purchases as the moment to improve light gun play so hoping this can get me through for a bit. So here’s what I found out, this comes in handy whenever I need to reinstall everything again one day… 1. I created anothe mame instance in my file explorer, mame lightgun (a copy of my existing mame folder) 2. I created an ahk script, then compiled it as an exe file, see below 3. In Launchbox, I created an new emulator, called Mame lightguns. It points to the the exe file of the compiled ahk script we just created for lightgun games 4. All the games in the playlist of Launchbox, called Lightgun Games, will be launched by my newly created Mame lightgun-emulator And finally, the script was this: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. ;SetWorkingDir C:\Program Files\AutoHotkey ; Ensures a consistent starting directory. SetWorkingDir D:\retro\emulators\mame light\mame64.exe Run, C:\Program Files\Touchmote\Touchmote.exe, C:\Program Files\Touchmote Sleep, 3000 RunWait, D:\retro\emulators\mame light\mame64.exe -keyboardprovider dinput %1% ;Sleep, 2000 Loop, 2 { ;MsgBox, Iteration number is %A_Index%. ; A_Index will be 1, 2, then 3 WinClose, ahk_exe Touchmote.exe } the script runs touchmote first, then wait 3 seconds before launching mame. When quitting the game, it closes touchmote too. I hope it solves your problem Edited March 11, 2022 by pina Quote Link to comment Share on other sites More sharing options...
thefritz11 Posted March 11, 2022 Share Posted March 11, 2022 22 minutes ago, pina said: So here’s what I found out, this comes in handy whenever I need to reinstall everything again one day… 1. I created anothe mame instance in my file explorer, mame lightgun (a copy of my existing mame folder) 2. I created an ahk script, then compiled it as an exe file, see below 3. In Launchbox, I created an new emulator, called Mame lightguns. It points to the the exe file of the compiled ahk script we just created for lightgun games 4. All the games in the playlist of Launchbox, called Lightgun Games, will be launched by my newly created Mame lightgun-emulator And finally, the script was this: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. ;SetWorkingDir C:\Program Files\AutoHotkey ; Ensures a consistent starting directory. SetWorkingDir D:\retro\emulators\mame light\mame64.exe Run, C:\Program Files\Touchmote\Touchmote.exe, C:\Program Files\Touchmote Sleep, 3000 RunWait, D:\retro\emulators\mame light\mame64.exe -keyboardprovider dinput %1% ;Sleep, 2000 Loop, 2 { ;MsgBox, Iteration number is %A_Index%. ; A_Index will be 1, 2, then 3 WinClose, ahk_exe Touchmote.exe } the script runs touchmote first, then wait 3 seconds before launching mame. When quitting the game, it closes touchmote too. I hope it solves your problem So---I have done a few basic scripts for pause screens etc. but compiling as an .exe file is close to another language to me. That is not something you can share is it? Quote Link to comment Share on other sites More sharing options...
pina Posted March 12, 2022 Author Share Posted March 12, 2022 2 hours ago, thefritz11 said: So---I have done a few basic scripts for pause screens etc. but compiling as an .exe file is close to another language to me. That is not something you can share is it? I just gave you the script… it’s autohotkey script and you just have to create a .ahk file, then compile it to an exe. It’s just a click to do so. I refer you to the tutorial of AHK and you’ll understand Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 12, 2022 Share Posted March 12, 2022 15 hours ago, thefritz11 said: So---I have done a few basic scripts for pause screens etc. but compiling as an .exe file is close to another language to me. That is not something you can share is it? To compile the AutoHotkey script you need to have the full AutoHotkey program installed on your system.  Alternately, when you create your 'new emulator', instead of pointing to a compiled AHK script (script_name.exe), you can use the AutoHotkey executable that comes bundled with LaunchBox and directly use your uncompiled script_name.ahk. Here's a little how-to do this. See the part "Add the "new" Emulator:".  (You can skip the end part regarding the Startup Screen.)  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.