Jump to content
LaunchBox Community Forums

AceEsCloud

Members
  • Posts

    35
  • Joined

  • Last visited

Posts posted by AceEsCloud

  1. Hello, I have LED Blinky configured properly and when I launch a table the lights are properly lit and mapped through LED Blinky but when the table completely loads the lights go off.  I believe the issue is that Future Pinball is launched through a .ahk script that I made which then loads FPLoader.exe that THEN launches a number of things including Future Pinball.exe (I do not believe FP Loader remains open).  LED Blinky believes that Future Pinball is closed because the program that initially runs does not remain active (I assume).  I am trying to find a work around for this but launching Future pinball has become quite complicated on my machine because I also enable a couple of things during launch (pinscape controller gets activated, joytokey gets activated and tables launched).  

    I have read that some people are able to keep FPloader active somehow to keep LED Blinky operating but I do not fully understand the AHK code.  My script is below (the .bat files enable my D.O.F. controller).  I am also wanting to close Joytokey at the end of the script but this is non critical and just figured I would add it to this issue.  This initial script was built through trial and error and help via the forums because I do not fully understand ahk...  

    I also included a screenshot of the forum post I read that addresses this issue but I don't know how to implement this on my end and really I am hoping there is a simpler way?

    ******************************************************************************

    Run, "C:\Users\Arcade\LaunchBox\Tools\DevManView\pinscape_enable.bat"
    Sleep, 500

    Run, "C:\Program Files (x86)\JoyToKey\JoyToKey.exe"
    Sleep, 500

    Run, "dmdext.exe" mirror --source=futurepinball -q --virtual-stay-on-top --fps 60 -g "[GAMENAME]" --use-ini="C:\Visual Pinball\VPinMAME\FP_DmdDevice.ini", C:\Visual Pinball\VPinMAME, Min

    Run, "C:\Games\Future Pinball\BAM\FPLoader.exe" /play /exit /open "%1%"
    Sleep, 10000

    While WinExist("ahk_exe Future Pinball.exe")
      sleep 700    

    Process, WaitClose, dmdext.exe
    Run, "C:\Users\Arcade\LaunchBox\Tools\DevManView\pinscape_disable.bat"
    ExitApp

    *******************************************************************************

    Screenshot 2025-04-17 164518.png

    20250417_170525.jpg

    Screenshot 2025-04-17 165147.png

  2. I believe I got it working by changing it to this;

     

    Run, "C:\Users\Arcade\LaunchBox\Tools\Mayflash disabler\Mayflash enabler.bat - Shortcut"
    Sleep, 2000

    RunWait, "C:\Users\Arcade\LaunchBox\Emulators\Dolphin-x64\Dolphin.exe" -b -e "%1%"

    $Esc::
    $vk07::
      Send, !{F4}
      Process, Close, dolphin.exe
      Run, "C:\Users\Arcade\LaunchBox\Tools\Mayflash disabler\Mayflash disabler.bat - Shortcut"
      ExitApp

     

    Thank JoeViking245 for the help!!

    • Game On 1
  3. This works but I need to add an exit command to the script.  I used almost exactly what JoeViking245 suggested (with some minor path edits).  I compiled the .ahk script to an .exe using the AutoHotkey script compiler.   When I compiled I used "v1.1.36.02 U64 Unicode 64-bit.bin" as the base file (in the hotkey script compiler tool).  This specific version gives me the elevated permissions and therefore allows the .bat files to run on my system.  I figured this out via trial and error working on the Visual Pinball stuff a couple months back.  I believe JoeViking helped me with this before as well!

    Anyways, after compiling I went into launchbox and added a new emulator.  Named the new emulator "dolphin with mayflash".  I set the application path to be the script file that I compiled (in my case;  "C:\Users\Arcade\LaunchBox\Tools\Wii Mayflash Loader\Wii Games Load Script.exe).  I also checked  the box for "attempt to hide console window on startup/shutdown".   I then went to one of my Wii games and changed the emulator to be the new emulator "dolphin with mayflash".  Later I will bulk edit all of the Wii games to use this emulator once I get it 100% working.  This properly launches the game and enables the Mayflash controller!!!  The only issue I now have is that when I hit press escape it does not exit the game so I have to add something to close the game.  On a good note when I force close the Wii game it does run the other .bat file and disables the mayflash as it should.  

    What would be the best way to edit this script to allow ESC to exit whatever Wii game I launched?

  4. I have been having issues with Retro arch picking up the wrong controls because the Mayflash Dolpin bar is always active as a game controller.  I only need this device active when I play Wii games though.  I created a .bat file that enables the Mayflash Dolphin bar and I want to launch this when I launch any Wii title.  Also, when I exit the Wii title I want to launch another .bat file that disables the Mayflash Dolphin bar.   

     

    I have done this before with a pinball device (pinscape controller) and use a script when launching pinball tables that enables / disables my pinscape controller so I believe I would modify this script to work for this new purpose.  I linked this script below.  If anyone has any insight on how I would implement something similar for my new purpose please let me know.  This is the script I used for visual pinball;

     

     

    *****VP script below*****

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 2000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%"
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    Process, WaitClose, VPinballX.exe
    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat - Shortcut.lnk"
    WinActivate, ahk_exe LaunchBox.exe
    WinActivate, ahk_exe BigBox.exe
    ExitApp

    *****End script****

     

     

    If anyone is curious here are the two .bat files I am planning to launch when I launch Wii Games.  I created .bat files of these, then created shortcuts of the .bat files and in the shortcut properties I checked "run as administrator".  These work GREAT every time, just need to figure out the best way to run when I run Wii titles.... 

    *****Disable Mayflash*****

    PNPUTIL /disable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_00"
    PNPUTIL /disable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_01"
    PNPUTIL /disable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_02"
    PNPUTIL /disable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_03

    *****End .bat file*****

     

    *****Enable Mayflash*****

    PNPUTIL /enable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_00"
    PNPUTIL /enable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_01"
    PNPUTIL /enable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_02"
    PNPUTIL /enable-device /deviceid "HID\VID_057E&PID_0306&REV_0100&MI_03

    *****End .bat file*****

     

  5. Hello, I am making a series of playlists in launchbox so that I can display comics in the platform category of launchbox.  So far all of this is looking great in Bigbox but the issue is that the added playlists are also showing up in my "favorites". 

     

    Attached is a screenshot.  "AGL" is my only "favorites" playlist and I use it to dump games that I play often.  I am about to import 17,000 comics so when I do this my favorites list is going to be saturated with a bunch of stuff that does not relate.  I cannot find a way to remove these playlists from the favorites view...  I have other playlists in my system that do not appear here so I know its possible (example "arcade 2-player games, etc).     

    image.png

  6. Hello, I have a drive from another system that has a bunch of comics on it that I would like to import into another system.  I would like to import it and have it show up on my system EXACTLY as it is on the other systems.  I am trying to maintain all of the platform category information, images, etc.  I moved the ROMS, images and emulator over and imported everything into my system.  The platform category info is not retained and I am also having issues with images.  I am sure there is an easy way to "mirror" a platform to a new system but I do not know how...  Attached are screenshots showing the system I am trying to import from and how clean it is and then another image of the mess my system is currently in when just importing.  These are a bunch of comics so if I cannot "mirror" it then I would have to manually build a library for every comic book series which would take weeks if not months...  There has to be an easy way to copy this and retain all of the organization.  Any help with this is appreciated.  

    Screenshot 2024-07-08 192041.png

    Screenshot 2024-07-08 192214.png

  7. This was what I converted to .exe using v1.1.36.02.  Works great, I'm cleaning everything up a bit but I think my issue is resolved!!!!  thanks again!

     

    Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat"
    Sleep, 2000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%"
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    Process, WaitClose, VPinballX.exe
    Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat"
    Sleep, 2000
    ExitApp

    • Game On 1
  8. I tried Klinkyfox's suggestion yesterday and I cannot remember the issue I had but I had an issue that I could not solve. 

    I believe the issue I am having is similar to the issue I was having yesterday.  I have AutoHotkey V 2.0.13 installed on my system.  When I launch a .ahk script it uses the AutoHotkey version I have installed on my system AND WORKS GREAT.  Because AutoHotkey V 2.0.13 is installed on my system I am assuming it has more permissions than a portable .exe

    When I convert VP_Load_Script.ahk to a .exe I compile it using base file "v1.1.36.02" and it creates a .exe that runs this version (which I assume does not have the permissions to run my .bat file as an administrator).  

    To fix this, I attempted to compile this as a "v2.0.13 U64 AutoHotkey.64" which is the version installed in my system.  This way when it loads the .exe it uses the version installed on my system.  Issue is, I cannot compile this using v2.0.13 though because the Syntax used in AutoHotkey v2 is different from V1 (I think).  So now I'm trying to find a way to force my .exe to use my installed version or elevate the permissions of this .exe file somehow.  

    If I can't figure out how to do that I am going to figure out how to rewrite the v1 syntax in v2 form...

    image.png.3c4eb1893b2bca50c31e2d780c7a2a99.png

  9. I added quotations around the %1%.  It launches the tables and roms perfectly.  It does not enable the pinscape device.  I messed around with this a bit and learned that if I execute the .ahk file it does enable the plunger but if I execute that same .ahk file as a .exe it does not.  

     

    I was stunned by this because I am essentially doing the same thing in pinball FX3 (converted the .ahk to a .exe) and to my shock pinball FX3 also no longer works.  I have changed nothing to my knowledge.  I tried rebooting to see if it was a hardware error but it is not.  Future pinball still works flawlessly....  So close yet so far.  Here is what I scripted for VisualPinball (note I omitted the pinscape disable portion just to make sure that isn't a factor).  Wondering if I am back to running as administrator issues...  idk  I'm going to keep messing around but can't at the moment.

     

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%"
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    ExitApp

  10. I don't believe launchbox liked me pointing to a .ahk file and I remembered having an issue with this in the past with another emulator as well.  So I simply converted the .ahk to a .exe and pointed to it.  I am now having a new issue.  When I run the autohotkey exe I created it opens up everything as it should.  When launchbox runs it it comes up with an error "error loading c:\visual". 

    This almost appears like it tried to load c:\visual because there is a space between visual and visual pinball but "c:\visual pinball\" is covered by quotations so this shouldn't have been an issue?  I don't know...  I feel like I'm soo close.  Anyways, current script below as well as emulator settings screenshot and error screenshot.  

    This was what I converted to exe;

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play %1%
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat - Shortcut.lnk"
    ExitApp

    Screenshot 2024-06-02 151413.png

    Screenshot 2024-06-02 152233.png

  11. Below was the AHK for pinball FX3.  For some reason or another I had to convert the AHK to an EXE THEN point my emulator at the EXE.  I may try this for Visual Pinball but can't see why it would make a difference.  

    #SingleInstance, Force
    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000
    Run, "C:\Program Files (x86)\Steam\Steam.exe" -applaunch 442120 -class -table_"%1%"
    #IfWinActive ahk_exe Pinball FX3.exe
    SendMode, Input
    $Esc::
    Process, Close, Pinball FX3.exe
    ExitApp
    return
    $vk07::
    Process, Close, Pinball FX3.exe
    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat - Shortcut.lnk"
    ExitApp

  12. That was in there, I somhow managed to delete it when I retyped for the forum, same issue exists;

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%"
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat - Shortcut.lnk"
    ExitApp

     

    On another note, I was able to very easily get Pinball FX3 working.  Instant dopamine hit but then was quickly lost when I realized I never setup my pinball plunger to work with FX3 anyway LMAO...  Guess that's a project for another day but I'll probably have to use xarcade input or some other KEY to XInput app to get this working (Plunger is seen as a controller but my buttons are L and R shift)...  I'll drop the script in the forum later in case anyone else ever needs it.

     

  13. I'm getting an error with Visual Pinball when trying to launch from a script;

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000

    Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play
    Sleep, 10000

    While WinExist("ahk_exe VPinballX.exe")
      sleep 700

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat - Shortcut.lnk"
    ExitApp

    image.png

  14. 4 hours ago, JoeViking245 said:

    Earlier you said you couldn't Run a file that is a shortcut.  At the time I ignored that.  I think now, times are a changin'. ;) 

    If you have a batch file located:  D:\MyFiles\myBatchFile.bat

    ..and you create a shortcut in the same folder to that file, the file will show as D:\MyFiles\myBatchFile.bat - Shortcut

    To execute the shortcut in an ahk script, use:

    Run, "D:\MyFiles\myBatchFile.bat - Shortcut.lnk"

    ..adding the file extension .lnk (that's an L (ell). Not an i (eye).  Short for LINK).

    Since your shortcut is already set to run as admin, this should work. And you shouldn't need to use "Run *RunAs".

     

    At the end of the batch file, add "pause" (without quotes).  This will hold the command prompt window open until you press the 'any' key.

    If and when everything gets to working properly (fingers crossed), you'll want to remove that.  Then, as a bonus, edit the shortcut file(s) (properties) and in the Shortcut tab, change Run to Minimized.  That will then hide the command prompt window. Giving it that finishing touch.

     

    Your emulator settings look fine. 

    The scripts have the file extension .ahk .  If you have AutoHotkey installed, that file extension will be registered to it.   When double clicking the file, it will open with your installed version of AutoHotkey.  Not everyone has it actually "installed".  So double clicking a file with a .ahk extension would do nothing (except ask you what application you want to open the file with). 

    In my examples of creating an AHK script 'as an emulator', it was just easier to have them launch the script using AutoHotkey that comes with LaunchBox than to assume they have it installed.

    To use your installed version of AutoHotkey, replace the Application Path with the path to your installed copy of AutoHotkey.exe.  Alternately, since the file extension .ahk is registered to AutoHotkey (that you installed on your system), you could replace the Application Path with the path to your script (.ahk file) and then remove the Default Command-line Parameters.

    YAY!!!  the first part of your post did not work (using short cut).  However changing my emulator to point directly at my script vs. using launchbox's preinstalled autohotkey.exe did.  The only thing I can assume is that the AutoHotKey.exe version that comes with launchbox blocks any app from running as administrator.  This works perfect now with Future Pinball!  I have to setup FX3 and Visual pinball now.  These do not use AHK scrips to load though so I have to now figure this out.  I do believe that this will be easier than the latter was and if you know off hand how to do this please let me know (emulator screenshots below).  REALLY BLOWN AWAY BY THE HELP I RECEIVED, THANK YOU VERY MUCH!!!

     

    Also, I did end up linking to the shortcut and set that to run as administrator.  I did this so that I was easily able to set more launch options without having to figure out the script to do so (eg- changing the shortcut properties from run to minimize).  I want to note that this also worked with *RunAs directly to the .bat file though so it is loading as administrator in either setup!  Final script below;

     

    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk"
    Sleep, 10000

    Run, "dmdext.exe" mirror --source=futurepinball -q --virtual-stay-on-top --fps 60 -g "[GAMENAME]" --use-ini="C:\Visual Pinball\VPinMAME\FP_DmdDevice.ini", C:\Visual Pinball\VPinMAME, Min

    Run, "C:\Games\Future Pinball\BAM\FPLoader.exe" /play /exit /open "%1%"
    Sleep, 10000

    While WinExist("ahk_exe Future Pinball.exe")
      sleep 700    

    Process, Close, dmdext.exe
    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\no admin right\Pinscape_disable.bat - Shortcut.lnk"
    ExitApp

    vpin.png

    pinball fx.png

  15. Thanks for all the help so far!  The script works perfectly outside of launchbox by simply clicking it.  It does not load a table of course because that is handed off from launchbox but it does everything else (launches Future Pinball, DMD, enables my pinscape device and when closed disables etc).  However when it launches from launchbox it launches everything but my pinscape device never gets enabled. 

    I am almost certain that it is not launching the .bat file as Administrator.  To test that it is properly launching I changed the target after the first (Run *RunAs) command to be a website instead of "pinscape_enable.bat".  When launched from launchbox everything opens as it should and my website is launched..  So I am assuming it just doesn't launch the .bat as administrator (but it does when I double click the script file outside of launchbox).  I don't know how to keep cmd prompt up to show me what the .bat file processed so I am not 100% certain but I can't think of anything else other than the administrative rights that would cause this.

    Why would this script run perfectly outside launchbox but not in launchbox.  Once launchbox launches wouldn't it be the same as me just double clicking it?  I am a little confused about how I am launching this script in the emulator settings as well.  My settings were copied from other members on this forum because I don't fully understand what is going on.  I am confused as to why my emulator points to "ThirdParty\AutoHotkey\AutoHotkey.exe".  Why would I need to point to autohotkey.exe if my script uses autohotkey when it is launched because it is an .ahk script?  Maybe I have my emulator settings wrong?  

    I don't understand why it does this but the only thing I can assume through completely guessing is that I am running a different version of autohotkey when launching from launchbox and maybe the *RunAs command is not enabled in this version..  This is a complete guess though as I have no idea.  My emulator settings are attached.  Any thoughts are appreciated as always.  Thanks

     

    Side note, here is the current ahk scrip;

    Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\no admin right\Pinscape_enable.bat"
    Sleep, 10000

    Run, "dmdext.exe" mirror --source=futurepinball -q --virtual-stay-on-top --fps 60 -g "[GAMENAME]" --use-ini="C:\Visual Pinball\VPinMAME\FP_DmdDevice.ini", C:\Visual Pinball\VPinMAME, Min

    Run, "C:\Games\Future Pinball\BAM\FPLoader.exe" /play /exit /open "%1%"
    Sleep, 10000

    While WinExist("ahk_exe Future Pinball.exe")
      sleep 700    

    Process, Close, dmdext.exe
    Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\no admin right\Pinscape_disable.bat"
    ExitApp

    Screenshot 2024-06-01 113215.png

  16. THIS WORKED!  Now just have to create something to launch the exit script.

     

    Run, "dmdext.exe" mirror --source=futurepinball -q --virtual-stay-on-top --fps 60 -g "[GAMENAME]" --use-ini="C:\Visual Pinball\VPinMAME\FP_DmdDevice.ini", C:\Visual Pinball\VPinMAME, Min

    Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\no admin right\Pinscape_enable.bat"
    Sleep, 10000

    Run, "C:\Games\Future Pinball\BAM\FPLoader.exe" /play /exit /open "%1%"
    Sleep, 10000

    While WinExist("ahk_exe Future Pinball.exe")
      sleep 700

    Process, Close, dmdext.exe
    ExitApp

    • Like 1
  17. So I worked on a script for a little bit and learned that I cannot link to a shortcut using the AHK script.  It will just not find the file so I am left with having to link directly to the target file.  This now brings in the issue of opening "enable_pinscape.bat" as administrator.  I did some research on how to do this and I found that using the RunAs command I might be able to achieve what I am trying to do.  Below is a portion of the script I have been working on for Future Pinball and in one section of it I typed;

     

    "Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat"

     

    This does launch the .bat file and the other parts of the script do launch my program, tables and DMD device.  It does not run the .bat as admin though so my device never gets enabled.  So I changed this a bit using the RunAs command which is shown in the 2nd paragraph but does not work;

     

    Run, "dmdext.exe" mirror --source=futurepinball -q --virtual-stay-on-top --fps 60 -g "[GAMENAME]" --use-ini="C:\Visual Pinball\VPinMAME\FP_DmdDevice.ini", C:\Visual Pinball\VPinMAME, Min

    RunAs, Administrator, MyPassword
    Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat"
    RunAs
    Sleep, 10000

    Run, "C:\Games\Future Pinball\BAM\FPLoader.exe" /play /exit /open "%1%"
    Sleep, 10000

    While WinExist("ahk_exe Future Pinball.exe")
      sleep 700

    Process, Close, dmdext.exe
    ExitApp

     

    I have attached an image to this that shows the error it returns with.  I have tried using my windows password in place of "MyPassword" but I don't believe this is how the RunAs command works but I really don't know.  I need to find a way to run the .bat file as admin but only the .bat file and not other programs contained within the script.  Also, I still need to add in the command to run the "pinscape_disable.bat" when the program closes but haven't started on that yet (figured I would solve this issue first).  Appreciate any help with this.

    image.png.7ead9deb5ac11e00c84167db0ab67bde.png

     

  18. 9 hours ago, JoeViking245 said:

    IF the device can be disabled while VPX or FP is running (while it's still loading, actually), you can put the [full] command to disable-device in the emulators Running Script.  The Running Script will execute whatever is in there as the emulator/game is being loaded.  Since the disable-device command would happen real fast, it might be able to do-its-thing before the emulator gets loaded.  You then add an escape sequence that will enable-device.

    If disable-device has to be executed before the emulator is even a 'thought' (i.e. the above doesn't work), I can think of 2 options.  

    1. Add it to each table as an Additional App
    2. Create a new "emulator" that is a batch file (or AutoHotkey or PowerShell script or whatever flavor you prefer).  This "emulator" will:
      1. send the command for disable-device
      2. start the actual emulator with the 'ROM' that LaunchBox will pass to it
      3. wait for the emulator to exit
      4. send the command for enable-device

    For option #1, you can add the Additional App(s) to all the games (tables) at once using this plugin.

    Option #2, you wouldn't have to worry about the additional app(s) when adding new tables.

     

    That all said, since you say disable/enable need to be ran as administrator,

    • the 1st paragraph option would need to have the (AHK) Running Script call the batch file shortcut(s).  Rather than just executing the command(s) in AHK lingo. Which shouldn't be an issue.
    • Option #1 won't work.
    • Option #2, the "emulator" will need to call the batch file shortcuts in step 1 and 4 to have them ran as administrator. (Similar to bullet #1)
      • Can't have "the emulator" ran as admin because it would then run the actual emulator as admin. Which you DON'T want.

     

    There's a small thread here on the Forum dedicated to AutoHotkey scripts that's geared specifically to LaunchBox and emulators.  When you have a little time, look through that and get a feel for how the AHK scripts are written.  Then to learn more about a specific command (i.e. "SetKeyDelay"), simply Google "AHK SetKeyDelay" (without quotes).  Note, this specific search, the 1st 2 results show in the links "AutoHotkey v1" and "AutoHotkey v2".  You want the result for version 1 which is the version LaunchBox has integrated.

     

    Here's an example for Option #2 "creating an emulator" that's an AutoHotkey script.

     

    Thanks for the help, I will work on your suggestions and see what I come up with.  thanks

    • Like 1
  19. Hello, I have a 4 player arcade cabinet that also has some pinball controls implemented.  I had an issue with my pinball plunger because it utilizes controller port 1 in windows (it is always the first device on because it loads with windows).  This causes conflicts with other emulators that utilizes controllers and although there are workarounds for most emulators, I would like to completely eliminate the issue by simply disabling this device when not in use.  I have found a way to completely disable the device using a bat file and I can also reenable the device with another bat file.  These bat files have been tested and work flawlessly but I need to configure them with each respective emulator.  My plan is to set this up so that when an emulator related to pinball launches it launches a bat file called "pinscape_enable.bat" enabling my pinball plunger.  When I close the emulator it will run "pinscape_disable.bat" which will disable my pinball plunger.  I have considered using the "additional apps" feature in launchbox but this is per rom and I have decided that I should implement it globally per emulator instead.

     

    I feel overwhelmed here because I now need to implement this to visual pinball x, future pinball and pinball fx3.  Visual pinball x and pinball fx3 appear to launch just through lunchbox wearas future pinball launches using an auto hotkey script that I either copied or created about a year ago...  Any help with this is appreciated!

     

     

    My real frustration is that I want to learn and understand how all this works in launchbox.  I want to learn to write and implement auto hotkey scrips myself so that I don't have to continue asking every time I do some weird stuff with an emulator (which I do all the time it seems).  Although auto hotkey appears simple at its face, a lot of the stuff I have to copy and past from the forums to get an emulator working is overwhelming to me...  Any suggestions on where I can learn all of this is appreciated.  Not just learning auto hot key stuff but also how all of the launchbox dialog boxes work (eg running script, exit script, etc. how do these fields actually work)...

     

    **OTHER INFO**

    I am completely hijacking my own forum post just to help somebody out there who might be struggling with my same issue- if anyone is interested in the command I used to quickly disable my pinscape device I linked it below.  This can be used for any device in windows (eg controllers not in use).  Just find the device in device manager right click it and go to properties > device details and select "hardware ids" from the dropdown (copy the information shown here, normally only the first line is needed).  Replace the hardware ids below with your hardware ides (the hardware id is in between the quotations of the command written below).  Write this to a txt document, change the file type to .bat instead of .txt.  You will need this bat file to run with administrator privileges and the easiest way to do this is to create a shortcut of the .bat file and then right click the shortcut, select properties > advanced button > check the box for "run as administrator" (use the shortcut to launch the main file).   

    PNPUTIL /disable-device /deviceid "HID\VID_1209&PID_EAEA&REV_000:&MI_00"

    *multiple devices can be added at one time to disable or enable simultaneously 

    And to re enable create a separate bat file;

    PNPUTIL /enable-device /deviceid "HID\VID_1209&PID_EAEA&REV_000:&MI_00"

     

    NOTE

    PNPUTIL /enable-device /deviceid "YOUR HARDWARE ID GOES HERE"

     

     

×
×
  • Create New...