Jump to content
LaunchBox Community Forums

makaveeti

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by makaveeti

  1. Hi,

    Apologies guys, I'll describe my issue more clearly. I'm using the latest build of EmulationStation on Windows 7 x64.

    I've configured the systems I wish to emulate.

    I'm trying to configure the launching of simple windows games (streets of rage remake in this instance).

    My es_systems.cfg entry for windows games looks like this:

       	<system>
    	<name>windows</name>
    	<fullname>Windows</fullname>
    	<path>~\.emulationstation\roms\windows</path>
    	<extension>.lnk</extension>
    	<command>"%ROM%"</command>
    	<platform>windows</platform>
    	<theme>windows</theme>	
    </system>
    

    I have the windows game streets of rage remake (folder labelled sorr) in the roms folder.

    In the root roms folder I made a windows shortcut (.lnk) to the exe in the sorr folder. I tested this in ES and it launched perfectly.

    I then created a windows shortcut in the root roms folder to a .bat file in the sorr folder. The bat file contains the following code:

    @echo off
    start sorr.exe
    exit

    When I execute this .bat file within windows, the game launches perfectly. Full screen and starts playing.

    When I execute the same from ES, the game launches however the result is a odd. The screen resolution is resized as per the game however I only see my desktop (with ES and the game running in the background) (see screenshot).

    It feels like EmulationStation doesn't like .bat files. I replicated the exact same configuration in RetroFE and that works perfectly.

    The reason why I need to use a batch file is that I need to launch 2 exes files for my windows games (1st exe is the game, 2nd is an AHK script in the form of an exe file).

    Any ideas please?

    screen.png

  2. Hi Guys, 

    I've been playing around with the desktop version of Launchbox/Big Box for a while and done all the necessary configurations. I purchased a license to show my support with this great product.

    I'm struggling with choosing an appropriate hardware platform to use Launch Box/Big Box. My requirements are very simple and are stated below:

    - Box will be located in my living room connected to the TV via HDMI.
    - Games include Sega Genesis, SNES, A Handful of a PSX and MAME roms (mainly fighting games like Street Fighter Alpha 2 etc). No new games/systems will ever be added.

    I've heard that Windows 10 IoT on a Raspberry Pi is not suitable.

    Will a Intel Compute Stick be ok? 

    What version of the Intel NUC would suffice for a setup as simple as mine?

  3. I'm interested in a script where holding Button9 and button10 on my gamepad for 2 seconds will cause sorR.exe and AHK to exit.

    Here is my attempt. It works perfectly for button9 only. What needs adding to the code below so that holding both button9 and button10 together for 2 seconds executes the script?

     

    Joy9::
     KeyWait,Joy9,T2 ;wait 2 seconds for release key
     If (ErrorLevel) ;more than 2 sec have passed
     {
      Process, Close,  sorR.exe
      Exitapp
     }

    Return

  4. 3 hours ago, ckp said:

    very noice !!

     

    you shouldn't have to do this (in fact, i wouldn't do it):

    Process, Exist,  Autohotkey.exe
    If ErrorLevel <> 0
        Process, Close,  Autohotkey.exe

    ExitApp should be good.

    Thanks mate. Code looks cleaner.

     

    I'm interested in amending the code so that holding Button9 and button10 for 2 seconds will cause sorR.exe and AHK to exit.

    Here is my attempt. It works perfectly for button9 only. What needs adding so that holding both button9 and button10 together for 2 seconds executes the script?

     

    Joy9::
     KeyWait,Joy9,T2 ;wait 2 seconds for release key
     If (ErrorLevel) ;more than 2 sec have passed
     {
      Process, Close,  sorR.exe
      Exitapp
     }

    Return

  5. @ckp - You are 100% correct. Well done for identifying the root cause.

    I tried using the ahk script tab with an emulated game and the scripts work fine! :)

    With regards to Streets of Rage Remake (Windows Game), I created a standalone exe with the following code (see below). After holding button10 and then pressing button 9 on my gamepad, the processes for streets or rage and AHK are closed. I configured LB to launch the ahk exe before the game. Happy days :)

     

    Joy9:: 

    If GetKeyState("Joy10") 

    Process, Close,  sorR.exe

    Process, Exist,  Autohotkey.exe
    If ErrorLevel <> 0
        Process, Close,  Autohotkey.exe
    Exitapp

    Return

     

     

  6. 15 minutes ago, ckp said:

    sure, just put in there what you already tried but make the very first line this, before you code:

    MsgBox I am a message without hotkey.

    and replace your WinClose line with this:

    MsgBox I am a message with hotkey.

     

    run the game from LB. You should get a message popup right away. This first popup would prove autohotkey script is running and working.

    close the first popup.

    then exit the game that you have set for your controller to exit in your ahk script. Now you should get a popup again (but the game won't exit because its just a test). This second popup would prove if your controller hotkey is triggering.

     

    I amended the code. Tried it as a standalone EXE just to verify the code. It works as a standalone AHK exe. A message box pops up saying 'I am a message without hotkey' then when I trigger my gamepad buttons I see the message 'I am a message with hotkey'.

    I pasted the code into the AHK script tab in LB and launched my game but it doesn't work ;(

  7. 18 minutes ago, Crush said:

    Try this:

    ; Exit
    4Joy17::
       SetKeyDelay, -1, 110
       Process, Close, {{{StartupEXE}}}
    Return

    (4Joy17 = joystick no 4, button 17. You must change it to reflect your own joystick number and button, for example 1Joy2 = Joystick 1, button 2)

    This works in a standalone AHK exe. The code is different to my script which also works in a standalone AHK exe. Thanks for showing me.

  8. Hey Dos76, 

    Correct me if I'm wrong but I think Brad is referring to the Control Automation section in the LB Options section. It's greyed out in the free version and available with a premium licence. My original post is referring to the autohotkey script tab under the manage emulators section.

  9. Hi guys, 

    I'm new here. Firstly, great work with the Launchbox application - I love it and look forward to buying a license.

    I've having a slight issue with autohotkey scripts. I imported 'Streets of Rage Remake' which is a windows game. There is no exit option from the main menu of the game. To exit the game Esc must be pressed. I wrote a script in AHK to map one of my controller buttons to the Esc key. This doesn't work using a AHK script in Launchbox or when building a standalone ahk EXE. 

     

    I approached the issue from a different angle and wrote the following script and tested it using a standalone AHK exe file. It's programmed to look for an active window for Streets of rage remake game and exit when button 7 is pressed whilst holding button 8 on the controller.

     

    Joy7:: 

    If GetKeyState("Joy8") 

    { WinClose, Streets of Rage Remake - v5.0a

    }

    Return

     

    As a standalone AHK script, this works well. The issue is that when I paste the same code into Launchbox on the AHK script tab, it has no effect whilst I'm in the game. 

    Is this a defect? Can you guys offer any advice please?

×
×
  • Create New...