Jump to content
LaunchBox Community Forums

jayjay

Members
  • Posts

    385
  • Joined

  • Last visited

Posts posted by jayjay

  1. On 12/15/2018 at 5:32 AM, isilkin said:

    Hi, I have used your script to pop up an exit dialog when I want to quit a game. One question though: When the dialog is called it will minimize a game instead of displaying over the game. Is this what you are experiencing? Is there a way around it?

    I dont use this anymore as we can now shutdown through Bigbox. It might have something to do with the emulators being in full screen mode. But to be honest Im not entirely sure. Sorry I cant be much help. 

  2. This is what I have so far:

    1.thumb.png.b2408cb760e4ba4694c9856f37283baa.png

    If its green, you have it, if its red, you dont. Press Play or play next to launch a game and recording will start. After exiting the game press video to edit.

    2.thumb.png.15039db217fc1ee1bb54b35e61caec36.png

    Press "start cut" and "End cut" to create a clip  and press "add" to add the clip to the bottom. Press on the new clip at the bottom to add fade in or out or move the clip left or right. The clips are stuck together from left to right. So the left most clip is first and the right most will be last. Theres also a "play all" which will give you an idea of what the video will turn out like. It will show you the main video but it will jump from clip ones position to the next clips position and so on. In the interest of keeping read/writes to a minimum, I dont want to cut and add fade to each clip just to preview it. The issue is when pressing "play all" there is a flash of the beginning of the main video and also you will have to use your imagination of what the clip will look like with fade.

    Heres a few psp clips iv made with it.

    https://youtu.be/6eDpNnjb5ok

    https://youtu.be/l02dwbn-Lwk

    https://youtu.be/c1H299wBOdA

    The reason im posting this is because iv run in to an issue, the issue being..

    Im using ffmpeg to capture,cut,fade and crop the video. When recording the main video you will get the settings that you ask for, if you choose mp3 for audio format your get mp3 etc etc. BUT when adding fade or cropping... if i try to apply the same settings to fade or crop, ffmpeg has a hissy fit and errors out, its one of those, you fix one error it throws another error and on and on. The only way I have managed to get a complete video is by allowing ffmpeg to choose its own settings. So a main video that has 320kbps audio bitrate becomes 128kbps bitrate, framerate of 60fps becomes 30fps and so on.  I think what happens is, is my system isnt capable of encoding the clips to higher settings so ffmpeg refuses. If i force ffmpeg to record a framerate at 60fps I get a video that is out of sync and playback is super fast. But basically these settings become useless. But saying that using these clips in BB, they look alright. Also something else to take into consideration, if not cropping the video you will get something like a 1 minute video clip at 20mb or so.  

    Anway way my specs are:

    amd 6300 3.6

    gtx 960

    16gb ram

    With the last couple of days dealing with all these errors has me questioning if its going to work on other systems, so Im hoping some of you guys could test what I have so far. And give me some feed back. If it ends up throwing lots of errors for others it means ffmpeg will need to be configured per system. Which is to much for me to take on. ffmpeg is vast. Also are these clips good enough to use for BB?

    If your willing to test it heres how to set up.

    Download this and extract it to your plugin folder MissingMediaTool.zip

    Go here and download the windows package https://www.ffmpeg.org/download.html


    Extract it to Launchbox/Plugins/MissingMediaTool/and rename the folder to ffmpeg (all lower case). Its portable so no install.

    Another thing that might be an issue is recording the audio, took me ages to work this out. Go here and install this  https://sourceforge.net/projects/screencapturer/
    Now start the plugin from launchbox tools menu.

    The settings are:

    Play, play the game on the top left of screen.

    Images. Dont work, so no screen shots at the moment.

    Video, edit and create video.

    Play next, play the game on top right of screen.

    Note... keep an eye on the red and green. if the video is green and screenshot is red, it will still play. If your not paying attention you could create a video for a game that already has a video. I do plan on not having it record if a video already exists.

    Audio format, pointless.

    Audio bitrate, pointless.

    Volume, thats recording volume. 4 is right for me.

    Resolution or should that be aspect ratio. That you can change. Primary screen resolution is whatever your primary screen is.

    Frame rate, pointless. If you get playback of recording thats to fast or audio out of sync, lower the framerate.

    Hide mouse, if enabled the recording wont capture the mouse, disabled and it will.

    Gamepad doesnt work at the moment so you will have to use the keyboard. Arrows to move, enter to select.

    File name. If you want to save the clip the same as the game title or the same as the rom file name. In the interest of sharing your clips, game title would be best.

    Save folder, at the moment leave this as plugin, if you change it to default, which is launchbox/video/"platform" you might get an exception. Instead, with plugin selected the clip will be saved to launchbox/Plugins/MissingMediaTool/Media/Video/"platform". The reason for this and the main reason I started this plugin is so we could separate the missing clips from getting lost in the launchbox directory and we could share the clips with everyone else.

    So start it up, hit play next, record some gameplay. exit the game normally, go to video. and hit play.

    The arrows...  single arrow is back/forward 1 second, 2 arrows 10 seconds, 3 arrows 30 seconds.

    Everything else I think we covered or is self explanatory.

    Crop

     When using crop you cant crop just the title bar like so:

    crop1.thumb.png.9e17c95097387f6c9e82668df87b4db8.png

    it has to be something like:

    crop2.thumb.png.e24015cd171ee66522be5ec28b7d5608.png

    So far iv only encountered an issue when trying to crop just one side.

    Select the middle empty buttons to change the colour of font or border.

    When your ready hit Create Video.

    You will get a few command prompts, when a command prompt has finished, close it and the next one will open. Keep closing them until you get a pop up of your finished clip. I have left the command prompts open so you can see if it encounters any errors. When you get the finished clip pop up, you can choose to save the clip or delete it. 

    And I think thats it. If no one test this I have written this essay for nothing lol. 

  3. Its possible to create transparent gui's etc etc with ahk but the problem your have is when it pops up it will take the focus away from the emulator. You might be able to find a script that modifies a tooltip to be larger, different font, colour etc etc but thats not something i'll be looking into. You could easily play a sound file when you save/load using "SoundPlay, path-to-audio-file". But obviously thats not as good as a popup. Anyway glad you got it working.

  4. The popups are your UAC. Google UAC windows 10 or whatever OS your on and read up on it. Iv disabled it on my computer, your have to decide for yourself to disable it or not.

     

    In Launchbox go to

    tools

    manage emulators

    select project 64

    autohotkey tab

    and paste the script there.

     

    Each emulator has its own autohotkey tab.

     

    Also test to see if the script works for you, prob best to test it outside launchbox. Change all the send commands to "msgbox hello" to make sure the script works ok.

  5. 3Joy2::
    if getkeystate("3Joy8") && getkeystate("3Joy10")
    {
    	keywait, 3Joy2
    	goto SaveState
    }
    return
    
    3Joy4::
    if getkeystate("3Joy8") && getkeystate("3Joy10")
    {
    	keywait, 3Joy4
    	goto LoadState
    }
    return
    
    3Joy8::
    if getkeystate("3Joy2") && getkeystate("3Joy10")
    {
    	keywait, 3Joy8
    	goto SaveState
    }
    
    if getkeystate("3Joy4") && getkeystate("3Joy10")
    {
    	keywait, 3Joy8
    	goto LoadState
    }
    return
    
    3Joy10::
    if getkeystate("3Joy2") && getkeystate("3Joy8")
    {
    	keywait, 3Joy10
    	goto SaveState
    }
    
    if getkeystate("3Joy4") && getkeystate("3Joy8")
    {
    	keywait, 3Joy10
    	goto LoadState
    }
    
    keywait, 3Joy10, t5
    	if errorlevel <> 0
    	{
    		Send {esc down}{esc up}
    	}
    return
    
    SaveState:
    Send {F8 down}{F8 up}
    return
    
    LoadState:
    Send {F6 down}{F6 up}
    return

    This seems to work for me. Let me know if it doesn't work for you, there is another way to try.

    All the "KeyWait"... it will wait for you to release the gamepad buttons before it sends the keyboard keys. This is so it doesn't send the keyboard keys multiple times with each gamepad button press.

    Apart from this keywait:

    keywait, 3Joy10, t5
    	if errorlevel <> 0
    	{
    		Send {esc down}{esc up}
    	}

    All this is saying is...

    wait 5 seconds for 3joy10 to be released

    if it is not released in 5 seconds

    send escape

     

    Project 64.

    I use retroarch for n64 but can try...

    Im assuming your using Launchbox built in autohotkey. 

    Go to Launchbox/autohotkey directory. 

    Right click on autohotkey.exe, properties, compatibility, run as admin, apply.

  6. Give me an example of what combinations you want.

     

    As an example... I use 360 controller. I want select and RB to send esc and I want select and LB to send enter.

    That would be joy7 and joy5 to send esc. And joy7 and joy6 to send enter.

     

    So reply with the gamepad button numbers that you want to press and the keyboard button to send.

    Hope that makes sense.

    I'll get back to you after iv had some sleep. 

  7. run Emulator.exe "%EmuVar%" /fullscreen

    replace with this line in the script.

    ahk is portable. but for what you want here, passing arguments etc, get crazy errors. i can only get something like this to work with compiled scripts.

     

    you can achieve the same thing with a .bat but your get the command window. i dont know if using a bat to exe converter with invisibility will hide the window.

    @echo off
    timeout 3
    cd %~dp0
    start emulator.exe %1 /fullscreen

     

    or your have to wait for jason to expand on the additional apps, it might take a while though. its low on the poll. other than that im out of ideas.

  8. This is for a per platform ahk script. I know we will get some additional app love at some point. In the mean time I made this simple plugin. It will start a compiled script on game starting event and will close it on game exited event.

     

    How to use:

    Drop the plugin into the plugins folder.

    Create a new script within Launhbox/Autohotkey/ and compile it.

    Name the script to exactly the same as you have the platform named in LB. (example: "Nintendo 64" in LB, "Nintendo 64.exe" in the Launchbox/autohotkey/ directory.

     

     

    Iv included the source because if you can compile it, its simple enough to make it work with other apps.

    Here's an example of loading xpadder:

    Create a shortcut to xpadder, rename the shortcut to the same as the platform and place it inside, Launchchbox/autohotkey/ directory.

    namespace PlatformAHK
    {
        public class Class1 : ISystemEventsPlugin
        {
            private static string selectedGamePlatform;
    
            public void OnEventRaised(string eventType)
            {
                if (eventType == "GameStarting")
                {
                    IGame selectedGame = PluginHelper.StateManager.GetAllSelectedGames()[0];
                    selectedGamePlatform = selectedGame.Platform;
    
                    string platformAHK = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "AutoHotkey", selectedGamePlatform + ".lnk");
    
                    if (File.Exists(platformAHK))
                    {
                        Process process = new Process();
                        process.StartInfo.FileName = platformAHK;
                        process.Start();
                    }
                }
    
                if (eventType == "GameExited")
                {
                    Process[] Process = System.Diagnostics.Process.GetProcesses();
                    for (int i = 0; i < Process.Length; i++)
                    {
                        if (Process[i].ProcessName == "Xpadder")
                        {
                            Process[i].Kill();
                        }
                    }
                }
            }
        }
    }

    You only need to change 2 lines:

    string platformAHK = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "AutoHotkey", selectedGamePlatform + ".lnk");

    This line, change the .lnk at the end.

     

    if (Process[i].ProcessName == "Xpadder")

    Obviously change "Xpadder". Include the quotes. Don't add ".exe".

     

    PlatFormAHK.zip

     

    • Like 1
  9. Download and install autohotkey.

    Open the directory that has the emulator your using. 

    Right click anywhere within that directory, select new, autohotkey script.

    Rename the script to whatever you want, right click on it and edit with notepad.

    Underneath the lines that are already there, copy and paste the following:

    EmuVar = %1% %2% %3% %4% %5%
    
    sleep, 3000
    
    Run Emulator.exe "%EmuVar%"
    
    Exitapp

    sleep 3000 is for 3 seconds, 2000 would be 2 seconds and so on.

    In this script change Emulator.exe to whatever emulator you are using.

    Save it.

    Right click on the script and compile.

     

    In launchbox...

    Go to tools, manage emulators.

    Select the emulator your using.

    Leave all settings the same but point the "emulator application path" to the compiled script.

     

    Run a game and hope for the best. 

  10. 3Joy5::
    if GetKeyState("3Joy6")
    Goto, SomeFunction
    Return
    
    3Joy6::
    if GetKeyState("3Joy5")
    Goto, SomeFunction
    Return
    
    
    SomeFunction:
    {
    	Send {esc down}{esc up}
    }
    Return

    or 4 buttons:

    3Joy5::
    if GetKeyState("3Joy6")
    if GetKeyState("3Joy7")
    if GetKeyState("3Joy8")
    Goto, SomeFunction
    Return
    
    3Joy6::
    if GetKeyState("3Joy5")
    if GetKeyState("3Joy7")
    if GetKeyState("3Joy8")
    Goto, SomeFunction
    Return
    
    3Joy7::
    if GetKeyState("3Joy5")
    if GetKeyState("3Joy6")
    if GetKeyState("3Joy8")
    Goto, SomeFunction
    Return
    
    3Joy8::
    if GetKeyState("3Joy5")
    if GetKeyState("3Joy6")
    if GetKeyState("3Joy7")
    Goto, SomeFunction
    Return
    
    SomeFunction:
    {
    	Send {esc down}{esc up}
    }
    Return

     

  11. The shutdown script is now pointless as you can shutdown through BB.

     

    The only thing I can think of why this wouldnt work is the n64 controller isnt the only controller or peripheral you have plugged in? Does the test script say what joy number it is... something like joy, 2joy or 3joy.

     

    Try changing

    joy10 :: Send {tab down}{tab up}

    to

    2joy10 :: Send {tab down}{tab up}

    then

    3joy10 and so on.

     

     

  12. On 10/15/2018 at 3:17 PM, infidelity said:

    Please, can somebody look at my previous messages regarding JoyToKey?

     

    Within the autohotkey script, I run JoyToKey, but when the emulator launches along with jtk, the emulator statrs of minimized.

     

    I need a solution to this, because excuse I'm running jtk for the windows build of DeSmuLe, and Xroar.

     

    Please, what am  i missing?

    I dont use jtk but a quick google says that jtk has "start joytokey in minimised mode". Try enabling that first.

    And remove the /m from this line.

    On 10/5/2018 at 1:41 AM, infidelity said:

    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /m

     

    Have you tried googling the issue. 

    What about creating a shortcut to jtk, right click shortcut, shortcut tab, run... select minimised. Then use:

    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe.lnk

    If nothing works... solving something like this with ahk can be a pain in the ass. 

    Here's a few scripts to try...

    SetTitleMatchMode, 2
    
    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe
    
    loop
    {
    	if WinExist("MAME")
    	{
    		WinMaximize, MAME
    		return
    	}
    }
    
    $Esc::
    {
            Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
    	Process, Close, {{{StartupEXE}}}
    }

    Inside the loop you see "MAME" twice. You may need to change this, I dont use mame so im not sure if "MAME" will work, it needs to be a word that is in mame's window title. To find the window title, start mame, minimise it, hover over the mame icon on taskbar, your get the little window popup with the window title. I assume it will include the word mame. This script is case sensitive so make sure to get upper and lower case correct.

     

    SetTitleMatchMode, 2
    
    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe
    
    loop
    {
    	if WinExist("MAME")
    	{
    		WinRestore, MAME
    		return
    	}
    }
    
    $Esc::
    {
            Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
    	Process, Close, {{{StartupEXE}}}
    }

     

    SetTitleMatchMode, 2
    
    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe
    
    loop
    {
    	if WinExist("MAME")
    	{
    		WinActivate, MAME
    		return
    	}
    }
    
    $Esc::
    {
            Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
    	Process, Close, {{{StartupEXE}}}
    }

     

    SetTitleMatchMode, 2
    
    Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe
    
    loop
    {
    	if WinExist("MAME")
    	{
    		PostMessage, 0x112, 0xF030,,, MAME
    		return
    	}
    }
    
    $Esc::
    {
            Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
    	Process, Close, {{{StartupEXE}}}
    }

     

     

     

    And iv just read your post saying your trying to use this with Desmule and xroar. I cant be bothered to change all the times iv said mame in this post. So in the scripts swap out the word mame for whatever word is in the window title for desmule and xroar.

  13. 43 minutes ago, Lordmonkus said:

    It also warns the user that categories and playlists should be used instead of platforms for nesting purposes.

     

    I'm hoping... one day... we get a console theme for BB which would allow something like Games -> Platforms. 

     

    I'm guessing as it's only a warning it's still possible to nest platforms. So out of curiosity why the warning about nesting platforms? 

     

     

  14. Follow the same steps as my previous post. But type this:

    RomPath = %1% %2% %3% %4% %5%
    
    SplitPath, RomPath, RomName
    
    Run stella.exe "%RomName%"
    
    Exitapp

    If  it works, it should work with any game. The only issue is... if you have any additional apps for any games using stella or any ahk code in the stella autohotkey tab within launchbox. They wont work correctly. Launchbox will think this script is the emulator and when this script exits any addition apps or ahk script will exit as well.

    • Thanks 1
  15. Thanks guys. 

     

    I have to say this because it would of been excellent if it worked.

    It was my missing video's that first gave me the idea, I started working on that first. But realised that it might be possible to make an automatic screenshot tool. The way it works is...

    You would choose a platform.

    The plugin would create the list of games with no screen shot.

     

    It would automaticially start the first game.

     

    Then using autohotkey, have it repeatedly send the "start" button for 10 seconds or so. Then have it hold down right for 10 seconds or so, as you guys prob know using ahk you can simulate any key press. The idea being, simulate key presses to get from a games title screen into the game.

     

    It would then automatically take a screenshot or multiple screenshots. Then automaticially exit the game.

     

    The plugin would then automatically play the next game missing a screenshot and it would repeat this til completion. 

     

    So basically you would click a couple of buttons and watch game after game start, get passed the title screen, move about a bit, exit the game and accumulate screen shots without any other input.

     

    Obviously it wouldn't work to well on platforms such as Wii or Windows etc but I tested it on Nes about 30 games. Successful screen shots was only about 50%. I ended up with some screenshots that were paused, some still at the title screen etc. Would of been cool if it worked with better success rate. 

     

    Anyway I'm waffling... 

     

    The missing video's... Its out of my skill level to make something to.record a video. I have searched a little for a script that can do it but haven't found anything yet.

     

    My fall back idea is to make a plugin that creates a list of games missing a video. And use the Windows 10 gamebar or maybe OBS along with the plugin to basically create a tool similar to the missing screenshot tool but for video's. It won't be exactly the same but will still reduce the amount of work it takes to complete a platforms missing video's. 

  16. Right click anywhere within the Stella directory.

     

    New. Autohotkey script.

     

    Right click. Edit.

     

    Under the lines already there type.

     

    Msgbox %1% %2% %3% %4% %5%

     

    Save.

    Right click on new script. Compile.

     

    In LB tools. Manage emulators. Stella.

     

    Point the path to to the compiled scripts .exe.

     

    Run a game.

     

    If a msgbox does show with the path to the game. I'll write a simple.script that should hopefully launch any game using this method. But won't be til later. Gotta leave for work in 10mins.

  17. Iv re-read this thread and im thinking it's at a point that nothing is going to work for you but anyway...

     

    You previously created a bat file only using the file name? Adventure.bin or something. Have you tried in launchbox go to tools, manage emulators. Choose Stella and select the option that says.. use filename only without file extension etc etc. I doubt it will work though.

     

    I keep getting errors like that with the launchbox ahk.exe.

     

    You could try downloading autohotkey and installing it. It's free. Make sure to install the correct version, either 32/64 bit. 

     

    Then try something like...

    Copy adventure.bin into the same directory as Stella.exe.

    Right click anywhere inside that directory and choose... new... autohotkey script. (The script needs to be in the same directory as Stella.exe and adventure.bin)

     

    Right click on script and edit. Or open with notepad.

     

    Don't delete the lines of text that are there... Under them lines type...

     

    Run Stella.exe "Adventure.bin"

    Or

    Run Stella.exe "full path to adventure.bin"

    Include the quotes.

     

    Save it.

    Double click on the script and see if the game launches or not.

     

    If it doesn't then I'm also out of ideas. 

×
×
  • Create New...