Jump to content
LaunchBox Community Forums

pina

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by pina

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

  2. 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… :D

    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

  3. 3 hours ago, thefritz11 said:

    Sorry but would you be able post the exact script and how to implement? I have my wii motes working great with dolphin for Wii games but I believe I have to use touchmote before mame to get them to register in mame. I don't want to have to separately run touchmote play mame then quite before running a wii game so it sounds like your solution is exactly what I"m looking for.

    Wauw, I really have to dig very deep to answer you... Let me find out first myself because it's been almost 2 years... 😆 

  4. So I went to AHK forum too for some help and I got the pieces of the puzzle together now. It looks like it’s not a real admin issue, but it seems like the script just needs to be executed twice in order to quit Touchmote. I used the loop command to perform the WinClose command twice. But when compiled as an exe, I had to run it as admin.

    So I got it working finally... Thanks for your assistant

    • Game On 1
  5. So I tried the code in the remarks, so resulting in this code:

    #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\Touchmote ;Ensures a consistent starting directory.
    
    
    PostMessage, 0x112, 0xF060,,, ahk_exe Touchmote.exe  ; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE

    when I launch the script once, it does nothing. When I launch it again, then finally Touchmote quits. But always when I run the script a second time! I think this scripting tool is really mocking me. I can't see any logic explanation in such behaviour. I tried it on another Windows machine and have the same result.

    And no luck with either Hidden windows and WinKill 

  6. no option 4, then you have to map your buttons and the mouse cursor should be mapped as the Left or Right stick of the xbox 360 controller. In mame I chose a mouse as my lightgun device

  7. I’m getting crazy about this ?

    I try some other scripts with Touchmote, f.e.:

    if WinExist("ahk_exe Touchmote.exe")
        WinActivate, ahk_exe Touchmote.exe
    else
        Run, Touchmote.exe
    

    That runs fine, but when I change it just to WinClose instead of WinActivate it just won’t work at all ??
    The only 1 command I need keep refusing to work while all other commands just work, It’s so hard to find the error. When running the script, just nothing happens, even no error message!

    My Windows Spy shows it’s the right process I chose. Even when I change it to pid, it doesn’t close at all. Whengoing to Task Manager, I can manually disable the process

     

    CB6274F2-5EB3-4EE7-AF15-BBE46443D561.jpeg

  8. I really can’t get it working and it’s driving me crazy. So I just created a new script and only put this line in the code and compiled it:

    WinClose, ahk_exe touchmote.exe

    Touchmote just refuses to close. So I thought there was someting wrong with the syntax so I just replaced touchmote.exe with notepad.exe and that just works fine. So I thought maybe it’s because notepad.exe can be accessed from any folder. So I tried launchbox.exe:

    WinClose, ahk_exe launchbox.exe

    and yes, launchbox immediately closed... there’s something awkward with touchmote itself since it keeps refusing to quit...

  9. 3 hours ago, JoeViking245 said:

    %1% is a Parameter (or Variable) passed to the executable.  In this case it's the rom_file_name (samsho).

    If you think of it as executing your compiled script from the command prompt, you'd type

    
    D:\> MameWithTouchMote.exe samsho

    "samsho" is the 1st (only) Parameter and the executable program stores that (reusable) Variable as %1%

    If say you had

    
    D:\> MameWithTouchMote.exe samsho astdelux

    Your compiled script could be like

    
    Run, "D:\Utils\TouchMote\touchmote.exe"
    RunWait, "D:\Emulators\MAME\mame64.exe -keyboardprovider dinput %2%" ;run Asteroids Deluxe 
    RunWait, "D:\Emulators\MAME\mame64.exe -keyboardprovider dinput %1%" ;run Samurai Shodown
    RunWait, "D:\Emulators\MAME\mame64.exe -keyboardprovider dinput %2%" ;run Asteroids Deluxe 
    WinClose, ahk_exe touchmote.exe

    Variable. Reusable. Usable in any order.  

    [Of course LB is not going to be passing multiple games to your executable. ;)]

    I tried your first script. The runwait didn’t totally work because touchmote was loaded, but the wii remotes weren’t connected yet when the script launches Mame. So I addes a sleep command during a few seconds. So it works now.

    The last command doesn’t work though: WinClose. When quitting Mame, touchmote keeps running...

    I also have a strange behaviour. Sometimes when launching a title, it executes Touchmote two times resulting in an error message that it’s already active. When I just dismiss the message, go to mame then quit and try again, it won’t run touchmote twice again...

  10. 4 minutes ago, JoeViking245 said:

    Ya, I was afraid of that.

    Plan "C" would be what Headrush69 was leaning towards.... Keep the MAME Emulator unmodified, then for the games add a "Run before Main Application" Additional App that points to touchmote.exe. And then another Additional App that "Run After Main Application" that would either a) point to ../ThirdPaty/AutoHotkey/AutoHotkey.exe and uses the command line D:\path\to\file\ExitTouchMote.ahk or b) point to a compiled copy of ExitTouchMote.exe.  Both of which have    WinClose, ahk_exe touchmote.exe   in it/them.

    Problem is you'd need to add that for all games in the Arcade Platform.  Good thing is, if it's not already built into LB [yet?], there's a plugin in the Downloads area that will "(Bulk) Add Run Before/After Main Application" that adds an Additional Application to more than one game at one time.     ....Maybe...  ....I might not have uploaded it there. ?   (attached)

    Or just stick with plan "A". 

     

    Bulk Run Before-After.7z 34.06 kB · 0 downloads

    Ow I didn’t know there is a possibility to Add Run before/after main application. I think I prefer A more than C since it looks a bit cleaner. But about A, I was wondering what the function of %1% is? I don’t fully understand how LB could give a parameter to Mame so it knows which game to run? When launching directly, I guess that LB gives the command f.e. -samsho based on the title I click, but in the script, I don’t know how LB could give that parameter to Mame via AHS.

    Sorry if I explained it too difficult, perhaps I’m asking too many questions but I would like to understand what I’m doing :) instead of just copy paste is like a monkey :)

  11. 4 hours ago, JoeViking245 said:

    Plan "B" (afterthought) 

    Set mame64.exe as your emulator.  Then in the Running AutoHotkey Script tab

    
    Run, "D:\Utils\TouchMote\touchmote.exe"
    
    $esc::
    {
       WinClose, ahk_exe touchmote.exe
       WinClose, ahk_exe mame64.exe
    }

     

    I’ll try your proposals but about your plan B: I tried it before, using the script in LB directly, but the problem is that Mame starts up faster them Touchmote. Resulting in Mame loaded up, then Touchmotes a few seconds later. So my wii remotes aren’t detected by Mame since they need to be detected before Mame runs. I tried a sleep command and that doesn’t stop LB loading Mame of course, since launching Mame was not part of the script but part of Launchbox

     

    1 hour ago, Headrush69 said:

    Why not compile your touchmote script and than add that as an application that runs before MAME when you edit the details of the game.

    Advantages of this is you don’t have to change default emulator settings and if you ever add something like LEDBlinky you won’t have issues with or issues with LB/BB seeing wrong application closures. 
     

    Plus, I find it easier going back to a setup i did previously and seeing exactly how I set it up like this when parts/executable are separate tasks and you don’t have to worry about which script did what and launched which. 
     

    Just my 2 cents, JoeViking245’s method is sound. ?

    I tried compiling the script in the first place, check my first post :)

  12. Before launching MAME, I need to use an AHK script to launch TouchMote before it launches MAME. That way my wii motes are detected by MAME.

    1. I created a script in AHK, compiled it.
    2. In my emulator settings, I pointed the mame executable to the compiled AHK script

    When testing out, TouchMote gets loaded, then MAME. But the problem now is. that I get redirected to the main menu of MAME instead of launching the game directly.

    What parameters do I have to add in order to launch the game instead of the MAME maine menu?

    Furthermore I can’t figure out how to exit TouchMote, if it’s running , after I quit the game...

  13. So I managed to get my stable ID’s with my Bluetooth controllers. But it looks like it’s not working for my wii remotes. I’m using those wii remotes with TouchMote. So Mame recognizes it as an X360 controller named Xinput Player 1.

    Did anyone manage to get those remotes working with a stable ID? Because sometimes my controllers are on and sometimes they are turned off... f.e. when playing lethal enforces after playing street fighter with the  bluetooth controllers. The ID’s of the remotes just keep changing.

    My workaround right now is just have another mame installation for lightgun games. When I launch a lightgun game, it will start my alternate mame installation for lightgun games and only shows those remotes with the utility devreorder...

  14. Hi,

    So I bought the Dolphin Bar in order to play light gun games via MAME. But it’s only possible to use the Wii remotes when the app Touch mote is running. Since Touch mote breaks the wii remote in Dolphin emulator, I can’t keep Touch mote running the whole time. So I wanted to use this option to make sure Touch mote launches before dolphin starts.

    So that option works BUT before the Wii remotes get identified, touch mote must have been fully loaded before MAME starts up. And that’s my problem now: the sequence is right: start touch mote, then launch mame. But MAME loads up much quicker than Touch mote. I need MAME to start up when Touch mote is fully loaded into the systen.

    Is it possible to have some kind of delay in the parameters section? Additional question: is it possible to quit touch mote when I leave the game afterwards?

  15. Hi,

    I have a bunch of platforms and roms on my drive and I want to downloaded the assets of it by the Launchbox importer. But it seems like the filenames of the metadata don’t match with the filenames of the roms  f.e.:

    ROM filename: 
    Army Men - Sarge’s Heroes (USA).chd

    Imported assets: 
    Army Men_Sarge_s Heroes-01.mp4

    Is there any way that LB matches or renames them to the rom filename? Because I’m also using those assets in Arc Browser on my Shield and it’s required that the assets filenames matches the rom filenames, which I think make sense...

    I understand that it replaces special characters like ‘ to a _ I can easily batch rename those files. But (USA) being removed everywhere. And all the assets do have a 01 as suffix... that’s too much to rename in bulk....

  16. 3 hours ago, Jason Carr said:

    Does the crash occur every time for Neo Geo and never for other platforms? That could be a clue as to the problem. Is there any way you could take a screenshot of the file names?

    So far I tried several platforms and it only occurs with neogeo as chosen platform. The files I try to import are f.e. 3countb.zip and 3countb.fs. I tried them both seperately and they both crashed. So I was thinking that it’s because the roms are not suited for the neogeo platform but for arcade platform.

    But on the other hand, I don’t think launchbox scans the zip files entirely to check whether the files are suited for that platform...?

     

    BF20B49F-5530-4F05-8082-533DEDC46599.jpeg

  17. Same problem here, but so far only occurs on neogeo... my favorite system :(

    I thought it has to do with the filenames, becauase I have zip and fs files. Then tried to import that folder using another system, and it did not crash but no games were tobe found

×
×
  • Create New...