Jump to content
LaunchBox Community Forums

JoeViking245

Moderators
  • Posts

    2,984
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by JoeViking245

  1. 12 minutes ago, jivemd said:

    I am now looking to see if there is a way that I can have UCR already open( I’ll just open it at startup)

    If say you double-click on UCR.exe so that it loads (hanging out in the background?) and then start LB... then launch a game [with one of the above methods to load a profile], does it still freeze the emu?

    If not, you can just have a batch file that will start UCR and then start LB.

    @echo off
    f:
    cd "F:\Misc\UCR"
    start "" "UCR.exe"
    
    cd "F:\LaunchBox"
    start "" LaucnhBox.exe

    Adjust the drives and path accordingly.

  2. 9 hours ago, jivemd said:

    I want to activate a profile when launching retroarch or steam games  

    If you have a 'generic' profile you want to load for all Retroarch games, you can edit your Retroarch emulator and in the Running Script section you'd have something like

    Run, "D:\utils\ucr\UCR.exe" -p "full/path/to/Some profile.ext"

    Change the path to your UCR.exe and the path to 'Some Profile'.  And keep both those paths in quotes as shown.

    The potential problem here is, if the profile needs to be fully loaded BEFORE Retroarch starts, it may not work because these 2 (RA and the script) launch somewhat simultaneously.  But this method may still work.

     

    For individual RA games and Steam games, you can get the profile to load 1st before the 'emulator'.  Do this by editing the game(s) and adding an Additional Application and telling it to Automatically Run Before Main Application.

    image.thumb.png.4ed8b837838a4dd9045e992b938baf28.png

    Give it a name.  Browse to where your UCR.exe is located. Put in the command line, changing the path to YOUR actual profile (and leave the quotes). Check Automatically Run Before...

  3. 2 minutes ago, Nulion said:

    Is there a way to do this, but with the redream emulator? It worked flawlessly for pcsx2 :)

    Sure! Do the exact same steps above, except instead of editing your PCSX2 emulator, edit your Redream emulator. :D

    Just be sure to follow the "Notes".  Namely note #3 because the escape sequence is different between the 2 emulators.

  4. 11 minutes ago, Eussora said:

    How can I add two scripts?

    Put the "other" script above your hotkey script (same Running Script section).

     

    12 minutes ago, Eussora said:

    simple script to just go fullscreen as soon as the emulator opens

    Just change the emulator.exe name and replace  "send {F11}"  with  "Send, !{Enter}"  (no quotes)

    (then blow that, put in your escape hotkey sequence)

    • Thanks 1
  5. 31 minutes ago, tribe fan said:

    is there an easy way to open and close an Xpadder profile upon launching and exiting an emulator? I can't seem to find an easy way to do that.

    Running Script 

    Run, "D:\Utils\XPadder\xpadder.exe" -loadme "D:\Utils\XPadder\my_profile.ext"
    Process, Wait, myEmulator.exe
    while winExist("ahk_exe myEmulator.exe")
    	sleep 700
    WinClose, ahk_exe xpadder.exe

    It may be apparent that I know nothing about Xpadder.  So adjust:

    • Line 1 - the Path(s), executable and command-line to load your profile
    • Line 2 - the actual emulator you're setting this up for (it's probably not "myEmulator.exe")
    • Line 3 - same thing as Line 2
    • Line 5 - the executable for xpadder as necessary.

    The last line (5) may or may not work.  You may need to swap it with an exit emulator hotkey that includes xpadder.

    $esc::
    {
       WinClose, ahk_exe xpadder.exe
       WinClose, ahk_exe myEmulator.exe
    }

    If instead of closing xpadder you want to load a different (default?) profile, change the 1st WinClose line to something similar to Line 1 above.

     

    Not tested, but JoeViking approved.

  6. 1 hour ago, tribe fan said:

    Nothing special haha.

    Sleep, 2000

    Send, {F11}

    Try putting this in the Running Script section of your melonDS emulator.

    SetKeyDelay, -1, 110
    Loop
    {
       ifwinactive, ahk_exe melonDS.exe
       {
          send {F11}
          break
       }
    }

    (just in case ;))  Make sure you set "Toggle Fullscreen" to F11 in the General Hotkeys section under ConfigInput and hotkeys in the emulator itself.

  7. 53 minutes ago, tribe fan said:

    Hello,

    I'm trying to write a very simple script to send the F11 key to the melonDS emulator to go fullscreen after a game launches. I've tried multiple methods (including compiling the ahk to an executable and running before the app). Can't seem to get it to work.

    What does your script look like so far?

  8. 6 hours ago, Eussora said:

    The other one I tried, but I don't really know if it works (I found it around here) is this one:

    Esc::
    Process, Close, {{{StartupEXE}}}
    return

    If using this one, you should change it to

    $Esc::
    WinClose, ahk_exe {{{StartupEXE}}}

    The $ in front of the hotkey does 'something' (I never really looked into exactly what that is). Usually, it's not needed but does help in certain situations.  But the main point is changing the "Process" method to "WinClose".  The "Process" method is like unplugging your PC to shutdown Windows. Whereas WinClose is a little more 'gentile'.  "Return" is not necessary in either case.

     

    6 hours ago, Eussora said:

    The only thing it happens in some emulators (like Cemu) is exiting fullscreen mode, but nothing else.

    Cemu shouldn't need anything in the Running AutoHotkey Scripts section.  Are you running it as Admin?  Here's a thread discussing it. 

     

    6 hours ago, Eussora said:

    I'm using this along SuperF4

    I've never [had to] use SuperF4.  Which makes me believe it shouldn't be needed for any emulator.  But of course, there's always that odd one. ;) 

     

    When setting up most emulators in LaunchBox, it will automatically put in any required scripts in the Running [AutoHotkey] Script section for exiting the emulator. If required.

    • Thanks 1
  9. 9 hours ago, mcfilmmakers said:

    Now all the PCW machines only have one floppy drive, except pcw8512 which has two.

    Since pcw8512 has 2 FDD's, could you do something like

    pcw8512 -flop1 cpmplus -flop2

    or

    pcw8512 -flop1 %romfile% -flop2 cpmplus

    or

    pcw8512 -flop2 cpmplus -flop1

    I honestly have no idea and have no intention/desire to test it.  But I do love what you're doing with Lua scripting.  👍

  10. 11 hours ago, Kinglifer said:

    If I do this... how will the hot key I made activate? That part lost me. I know the Sleep section... timing there... Got that... Hey... thank you for answering as well. 

    As an Addition App set to Run Before Main app.  'We' removed the hotkey part and replaced it with a Sleep timer.

    So when you launch the game, this script will load 1st and then the game. The script will Sleep for 5 seconds, giving the game time to load.

    Alternatively (and better), replace Sleep with a WinWait statement (just like your above post).  This way you don't have to guess at the "5 seconds" (more or less).

  11. 11 hours ago, Kinglifer said:

    Code I got so far that does not work...

    Can you provide a little more detail?  Does any of it work? Where does it stop working?  Possibly at "Return"?  If you're running it Before Main Application, the window might not be active yet.   You may need to WinWait, ahk_exe TFOC.exe before trying to Send, ^!{Up}  or Send, 2.

  12. 11 hours ago, jivemd said:

    Joeviking245.. I have a UCR profile set up to emulate a Xbox controller for my steam games. I have been trying to convert your advice to my situation: loading a specific UCR profile when I open steam games and close it down when the game is closed. I always seem to run into different problems: either not working at all or opening in a separate window and freezing the emulation. Would you be able to offer some advice on the best way to accomplish this?  Also: would I have to add a script to every individual game or could it be a global script per platform?  Thank you. 

    I'm afraid I can't really help with this as I've never used the Universal Control Remapper program.  

    11 hours ago, jivemd said:

    opening in a separate window and freezing the emulation

    Is this opening a Command Prompt Window?  When this happens, if you use {Alt}+{Tab}, can you switch to the game and then play?  

  13. 1 hour ago, DeusX81 said:

    a runtime script to have emulators save/load state by using an AHK script

     

    1 hour ago, DeusX81 said:

    Joypad Button 7+9 to save a game state

    If the 'normal' Save Game State keypress is F2

    1Joy9::
       If GetkeyState("Joy7")	
       {
          Send {F2 down}
          Sleep 50
          Send {F2 up}
       }

     

    1 hour ago, DeusX81 said:

    Button 7+10 to load a game state.

    If the 'normal' Load Game State keypress is F4

    1Joy10::
       If GetkeyState("Joy7")	
       {
          Send {F4 down}
          Sleep 50
          Send {F4 up}
       }

     

    On both of these you'll need to press and hold Joy7 FIRST, then the other button (Joy9 or Joy10, respectively).

    Copy these into the Running [AutoHotkey] Script section of the emulator(s).

    • Like 1
    • Thanks 1
  14. 1 hour ago, erling1000 said:

    have a badge for games with retroachievements?

    It's not innate to LaunchBox (yet?), but there is a plugin that'll do just that.

     

    • Thanks 1
  15. 1 hour ago, TinyTsuruta said:

    any idea what the process associated with this would be in task manager?

    Because it's a plugin for LaunchBox, it's process is LaunchBox.

     

    1 hour ago, TinyTsuruta said:

    I am dealing with the PCSX2 core which hangs in task manager upon close

    I strongly suggest fixing this.  The easiest way to do that is to use standalone PCSX2 instead of the Retroarch core. Which I'm pretty sure is what's recommended.  But I understand if you have an affinity towards RA.  Regardless, that really should be resolved.

     

    In the meantime, if you have a keyboard and mouse handy, when that banner/image/window is there, and you don't want it there anymore... 

    • Hold the {Alt} key and tap {Tab}   (still holding the {Alt} key)
    • You'll see a display of all your open windows.  Still holding down {Alt}, look for the window that's the image-window needing closed.
    • Using the mouse, point to the upper right corner of that window and click the "X".
    • Like 1
  16. 15 minutes ago, SimonLev said:

    My main worry is that some of the ROMs will stop working if I upgrade MAME. Is that a risk?

    What @neil9000 said.  But also, I read there was a recent cease-and-desist order against the emulator developer(s) for [I thought] a couple of Cave machines.  One of which is "Akai Katana" which will be "removed" in v0.240.  So I suppose that could be considered "a risk". ;) 

  17. 7 hours ago, Kinglifer said:

    This game just wont load full screen with BigBox.

    Does it load full screen when you launch it on its own?  It should load the same via BigBox as it does when double-clicking the exe file in Windows Explorer.

     

    I don't have any [old] PC games on my setup, so can't help with any PC game particulars.  But being as we're in the AutoHotkey Scripts section of the forum: 

    You could setup an Additional Application for the game(s) and point it to your myScript.ahk file and check Automatically Run Before Main Application

    In your script, remove the  ^!{Up}::  hotkey label and add a Sleep, 5000 to the beginning.  Adjust the Sleep 5 seconds ("5000") up or down to accommodate game load time, before moving the window.

     

    If launching the game full screen (vs windowed) opens where it should (on the TV), but there's flickering, then there's most likely a game/display/monitor/tv setting that needs adjusting.  But that stuff is beyond me.

  18. 19 minutes ago, devsfan1830 said:

    That should work perfectly

    Well, almost.  Until you see that ugly Windows Command window. ;) 

    • Create a shortcut to this batch file.
    • Right click the shortcut and select Properties.
    • On the Shortcut tab, next to Run:, change it to Minimized.

    image.png.d1be7c3b8b7a7daf1e2e6431cbf21969.png

    • Click OK to save.
    • Run the batch file using the shortcut.
    • Play games.
    • Like 1
    • Thanks 1
  19. 16 hours ago, ElStocko said:

    This needs some refinement but the following command returns the commandline used to call a particular emulator. Easy to grab the rom name directly in AHK and no need for fancy scripts to call your emulator..

    wmic path win32_process where "caption='hoxs64.exe'" get commandline

    Which gives..

    CommandLine

    "D:\Emulation\C64\Emulators\Hoxs64\hoxs64.exe" -fullscreen -autoload "D:\Emulation\C64\Games\Freeze\space pilot.prg"

    Nice find, ElStocko!!!   Thanks!

    To expand on this further: If you wanted to use this in the Running AutoHotKey Script tab for an Emulator,

    queryEnum2 := ComObjGet("winmgmts:").ExecQuery(""
         . "Select * from Win32_Process where caption='hoxs64.exe'")
         ._NewEnum()[process]
    
    CommandLine = % process.commandline

    Then from here, the string %CommandLine% can be used with StringSplit and SplitPath to get what's needed.  i.e.

    MsgBox, %CommandLine%   ; "D:\Emulation\C64\Emulators\Hoxs64\hoxs64.exe" -fullscreen -autoload "D:\Emulation\C64\Games\Freeze\space pilot.prg"
    
    StringSplit, cl, CommandLine, "
    MsgBox, %cl2%        ; D:\Emulation\C64\Emulators\Hoxs64\hoxs64.exe
    MsgBox, %cl3%        ; -fullscreen -autoload
    MsgBox, %cl4%        ; D:\Emulation\C64\Games\Freeze\space pilot.prg
    
    SplitPath, cl4,fullrom,fullDir,,romName
    MsgBox, %fullRom%    ; space pilot.prg
    MsgBox, %fullDir%    ; D:\Emulation\C64\Games\Freeze
    MsgBox, %romName%    ; space pilot

     

    • Like 1
  20. 6 hours ago, Jayinem said:

    I tried changing all the per application options Windows gives when right clicking and choosing it didn't help.

    I'm curious, you say it didn't 'help'. But did it even do 'anything'? Good, bad or indifferent?  And you tested it on the executable in the /Core/ folder?  Actually, that's all more-so out of morbid curiosity because I don't think you're going to be able to accomplish what you want via Windows.  As you've seen, it's pretty much all or nothing.

    Have you messed with the adjustments under Tools, Options, Visuals, Boxes, Spacing?  That might just be your ticket.

  21. If you don't see anything on the "General" tab when you right click the file and select Properties, it should be ok.

     

    image.png.23b99064008ceb8daeaefaaa40c5dd57.pngimage.png.6939fc38bc2b9c36ee44b51d933c543f.png

     

    I've no idea when/why/how Windows decides to block it or not.  If you have the dll file in your  ../LaunchBox/Plugins/   folder, then start LaunchBox, you'll be able to use it when you select more than one game and right-click on one of the selected games and select "Bulk Run Before/After Main Application".

  22. Try unplugging one or some of the other USB devices, then restarting the computer. I know on my cab, if I have the USB dongle for my wireless 360 controller plugged in, and I turn-on/restart the computer, it won't recognize any of the buttons or joysticks connected to the I-Pac (even though their basically just keyboard key presses).

    But if I unplug the dongle, restart the PC, then plug it [back] in, everything is recognized.

    Just a thought. Process of elimination.

×
×
  • Create New...