Jump to content
LaunchBox Community Forums

jayjay

Members
  • Content Count

    218
  • Joined

  • Last visited

Community Reputation

70 Excellent

About jayjay

  • Rank
    32-Bit GPU

Recent Profile Visitors

1,020 profile views
  1. jayjay

    Auto Hotkey Scripts

    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. 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.
  2. jayjay

    Launchbox 8.9 Change Log

    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?
  3. jayjay

    Stella doesn't open

    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.
  4. 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.
  5. jayjay

    Stella doesn't open

    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.
  6. jayjay

    Stella doesn't open

    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.
  7. This will create a list of games on a per platform basis that is missing a "ScreenShot - GamePlay" image. When you click "next" it will play the next game missing a screenshot. It wont play games that are marked as broken, it will play games that are hidden. Using an ahk script that needs to be configured to take a screenshot with hotkeys, it will save the image with the game title to Launchbox/Images/"chosen platform"/ScreenShot-Gameplay/"game title-01.png". AutoHotkey installed is required to compile a script. To setup... Download the zip and extract the dll and missing screenshot folder to the launchbox plugin folder. Open the missing screenshot folder and open Configuration.exe (if you are using a 32bit OS, delete Configuration.exe and right click on Configuration.ahk and compile script) Choose your settings and save and exit. Right click on ScreenShotScript.ahk and choose compile. (if at any point you want to change these settings, like different hotkeys or window size etc, you would have to repeat this step) In Launchbox go to tools and select missing screen shot tool. Select a platform and wait. My n64 collection of 299 games takes about 20 seconds to gather the list of games missing screenshots. My collection of arcade, about 3400 takes a good 3 minutes or so. On the next screen select "next" and it will launch a game with no screenshot. Using the hotkeys, take a screenshot, a sound will play to indicate you've taken a screenshot. Manually exit the game and repeat til completion. This has only been tested on win10, LB 8.7 and usng x360 gamepad. Known issues: Only gamepad and keyboard work. No mouse at the moment. When on this screen: Only press "Next" once. If you press it more than once it will try to launch multiple times resulting in either emulator crash or multiple instances. I haven't figured out a way to counter this yet. If anyone actually uses this and comes across any other issues, please let me know. Missing ScreenShot Tool.zip Im not sure whose image im using for the background, found it on google, if its yours, thanks. The background image can be changed by replacing BackGround.png in... Missing Screenshot tool/Include/. The sound to indicate that a screenshot has been taken can be changed as well. Requires windows 10 gamebar or OBS or video capture software that can save as mp4 to a custom path and supports hotkeys. Set up: Download the zip and extract the dll and "missing video tool" folder to Launchbox/Plugins/. Gamebar set up: The gamebar saves captures to a folder named "Captures", I think the default location is C:/Users/username/Video/Captures. Move this folder to LaunchBox/Plugins/Missing Video Tool/. Open your gamebar settings and chose if you want to use start/stop recording or record that. Make note of the shortcut keys. NOTE: Pro: Pop up indication to show that you are recording, Con: Captures are saved with the window title + date and time, which means when using the missing video tool the filename can be cut off. OBS set up: Create a new folder at Launchbox/Plugins/Missing Video Tool/ and name it "Captures". Open OBS, go to File, Settings, Output Point the Recording path to the captures folder within LB directory. Change Recording Format to mp4. Select Hotkeys... Choose the same Hotkey for starting and stopping recording. Pro: Better file naming, default is date and time, can change by going to File/Settings/Advanced. Under "File Formatting" if you were to enter "Clip" or "Video" etc it will increment the filename, "Clip.mp4", Clip (2).mp4 and so on... Con: Cant seem to find an option that would indicate recording has started or stopped. Next: Go to Launchbox/Plugins/Missing Video Tool and open Configuration.exe. If you are using keyboard, select the "keyboard" checkbox, save and exit. If gamepad, on the left select the keyboard shortcut/hotkeys that starts/stops recording. On the right select gamepad hotkeys., save and exit. Right click on HotKeyConfig.ahk and compile. IMPORTANT: if you have any mp4 files within the captures folder. Launchbox/plugins/missing screenshot tool/captures, remove them, actually just remove all files, not really any need to remove all files but better safe than sorry. If you try starting Missing Video Tool within launchbox and nothing happens, it is likely you haven't removed all mp4's from the captures folder. The plugin wont start if it finds mp4's in the folder. (Actually that reminds me, if the plugin cant find the captures folder your get an exemption, i'll sort it and i'll put a warning about mp4's being within the folder instead of nothing happening) Open Launchbox, tools, missing video tool. How it works. Select your platform and wait for it to collect the list of games missing a video. On the next screen, select "Next" and it will launch a game that is missing a video. Also you'll see the focus jump to "Get Video Clips". I done this to stop any accidental presses on "Next". In game, use the hotkeys to create some video clips... can record how ever many times you like. Manually exit the game. Select "Get Video Clips", it will retrieve all the video clips that have been saved to the captures folder and will display the filename as buttons. Select any of the buttons to see a preview. If you select "Save", it will copy the selected clip to Launchbox/Videos/"Chosen Platform"/"Game Title.mp4"... if you choose save on more than 1 clip of the same game the previously saved clip will be overwritten. If you select "Move" it will copy the selected clip to Launchbox/Plugins/Missing Video Tool/Moved Clips/"Choosen Platform - Game title - date and time.mp4". Once you've done that, select "Next" again to launch the next game that is missing a video... also at this point it will delete any mp4 files found within the captures folder, removing any clips you did not move or save. This is why the plugin wont start if it finds any mp4's in the captures folder. Missing Video Tool.zip
  8. Hey @alec100_94. Would you mind helping me out with something please. public class Class1 : IGameMenuItemPlugin, ISystemEventsPlugin { IGame[] _filteredList; public string SelectedGamePlatform { get; private set; } public bool SupportsMultipleGames => false; public string Caption => "testing"; public Image IconImage => null; public bool ShowInLaunchBox => true; public bool ShowInBigBox => false; public bool GetIsValidForGame(IGame selectedGame) { return true; } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnSelected(IGame selectedGame) { SelectedGamePlatform = selectedGame.Platform; IGame[] _allGames = PluginHelper.DataManager.GetAllGames(); IGame[] _filteredList = Array.FindAll(_allGames, GameCheck); _filteredList[0].Play(); } public void OnSelected(IGame[] selectedGames) { return; } private bool GameCheck(IGame g) { if (g.Platform == SelectedGamePlatform) { if (!File.Exists(g.GetVideoPath())) { if (g.Broken == false) { return true; } else { return false; } } else { return false; } } else { return false; } } public void OnEventRaised(string eventType) { if (eventType == "GameExited") { _filteredList[1].Play(); } } } How would I access the _filteredList[] from the OnEventRaised. Everything iv tried results in nothing happening. I want to be able to exit a game and have the next game that is missing a video launch on the previous games gameExited event. Hope you dont mind me bothering you with this.
  9. Lol. Ok. Thats slightly better than my work. And thanks for git link, iv been using others examples as well. Check this out. This is retroarch save states as gamemenuitem. It even uses wpf... yeah. Now picture if you will... based off my plugin above... the code behind this lol. And no Im not showing you or anyone haha.
  10. Heres our thread: https://forums.launchbox-app.com/topic/46069-pause-menu/ Heres a vid of where we at so far: https://www.youtube.com/watch?v=3FGAz2J0TuU&feature=youtu.be We are using autohotkey because its simple and a lot less frustrating, I struggle finding the time to learn c#. By the way im a ground worker. I move heavy stuff, concrete floors, cement blocks, basically grunt work. Coding doesn't come natural to me, I guess its just a hobby. Im not expecting you to be able to help with anything as im not sure there's much needs doing and also if your capable of bringing yourself down to my level haha. Heres the plugin iv manage to scrape together so far: namespace ClassLibrary2 { public class Class1 : IGameMenuItemPlugin { public bool SupportsMultipleGames => false; public string Caption { get { return "Launch With PM"; } } public System.Drawing.Image IconImage { get { return null; } } public bool ShowInLaunchBox => true; public bool ShowInBigBox => true; public bool GetIsValidForGame(IGame selectedGame) { string retroarch = "retroarch.exe"; foreach (var emu in PluginHelper.DataManager.GetAllEmulators()) { var emuid = PluginHelper.DataManager.GetEmulatorById(emu.Id); string emuapp = emu.ApplicationPath; string someBS = emuid.ToString(); if (emuapp.Contains(retroarch)) { Emulator = "RetroArch"; if (selectedGame.Platform == someBS) { return true; } } } if (retroarch == "returnthisyouprick") { return true; } else { return false; } } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnSelected(IGame selectedGame) { var emulatorID = PluginHelper.DataManager.GetEmulatorById(selectedGame.EmulatorId); var emuPath = emulatorID.ApplicationPath; string emuFileName = Path.GetFileName(emuPath); string PmPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PauseMenu", "Scripts", Emulator + "-" + selectedGame.Platform + ".exe"); string PMArg = AppDomain.CurrentDomain.BaseDirectory + "|" + emuFileName + "|" + selectedGame.Platform +"|" + selectedGame.GetVideoPath() + "|" + selectedGame.FrontImagePath + "|" + selectedGame.BackgroundImagePath + "|" + selectedGame.BackImagePath + "|" + selectedGame.Box3DImagePath + "|" + selectedGame.Cart3DImagePath + "|" + selectedGame.CartBackImagePath + "|" + selectedGame.CartFrontImagePath + "|" + selectedGame.ClearLogoImagePath + "|" + selectedGame.GetMusicPath() + "|" + selectedGame.ScreenshotImagePath; Process PM = new Process(); PM.StartInfo.FileName = PmPath; PM.StartInfo.Arguments = PMArg; PM.Start(); } public void OnSelected(IGame[] selectedGames) { return; } } } The valid for method... I want it to be valid for certain emulators, in this case retroarch. I haven't spent much time on this but reasons unknown to me, somehow this seems to work. In my mind this makes no sense. But @Axenn did suggest this: var emulators = PluginHelper.DataManager.GetAllEmulators(); // it's an array you could access by the row, example: emulators[0].ApplicationPath; Which is obviously a little more elegant than my mess haha. I just haven't got round to it yet. As you can see in the onSelected method this plugin will launch "Emulator filename-Platform.exe". I was thinking of creating multiple scripts based on platform but that creates a mess if I wanted to update stuff. I haven't figured out exactly what to do just yet. The onSelected will also send image/video paths etc as arguments as autohotkey can capture these. I can then give the user the option of displaying front-cover, per game video etc etc within the menu. But at the moment this will only work as a gamemenuitem using play() which means It wont open if the user chooses "launch with" etc. As you can see from my terrible code I am a proper noob. I didnt read any tutorials or learn anything c# before jumping in to LB api and using google. I know this is naughty, I could tell how naughty from how many down votes Iv got on stackoverflow since iv started c# haha. Anyways as I said I dont think theres much to say, but thought I would share what we are up to.
  11. You no doubt know more than I do. Im a c# noob as well as a LB api noob. With jasons advice Iv been trying, when I can, for a couple of days now to get game info on gamestarting event without success, as you say it seems the onselected methods are just for game/menu items. Im trying to get image/video paths etc for any game that is launched with the "Play" and "Launch With" options in the game menu. Avoiding the need for the user to select my plugin from the game menu. Maybe jason misunderstood my non technical mumbo jumbo, that or im to dumb to work it out. Anyway I apologise, I have no code to share that works.
  12. Im not to great with the technical stuff but im assuming your number 1 request is the same question i asked in the themes/xml help thread recently. Jason replied with something like. Use the onSelected method to store private variable to access with the gamestarting event. I was sort of on the right track with that one but not quite. You'll see my noob code skill in that thread also. Unless iv miss understood your request which is highly likely.
  13. jayjay

    XAML Tips and Tricks

    The code I was going to post but edited for fear of embarrassment was: public class Class1 : ISystemEventsPlugin, IGameMenuItemPlugin { public string AppPath { get; private set; } public bool SupportsMultipleGames => false; public string Caption => null; public Image IconImage => null; public bool ShowInLaunchBox => true; public bool ShowInBigBox => false; public bool GetIsValidForGame(IGame selectedGame) { return true; } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnEventRaised(string GameStarting) { if (GameStarting == "GameStarting") { MessageBox.Show(AppPath); } } public void OnSelected(IGame selectedGame) { string AppPath = selectedGame.ApplicationPath; } public void OnSelected(IGame[] selectedGames) { return; } } But my message box was always blank. Was I on the right track or have I just embarrassed myself again lol. That's a rhetorical question, don't answer that. Anyway Thanks @Jason Carr. I'll keep trying.
  14. jayjay

    XAML Tips and Tricks

    I have another noob api question if someone wouldn't mind helping me out please. Is it possible to achieve the following: public class Class1 : ISystemEventsPlugin, IGameMenuItemPlugin { public bool SupportsMultipleGames => false; public string Caption => null; public Image IconImage => null; public bool ShowInLaunchBox => false; public bool ShowInBigBox => false; public bool GetIsValidForGame(IGame selectedGame) { return true; } public bool GetIsValidForGames(IGame[] selectedGames) { return false; } public void OnEventRaised(string GameStarting) { if (GameStarting == "GameStarting") { MessageBox.Show(selectedGame.ApplicationPath); //Here } } public void OnSelected(IGame selectedGame) { return; } public void OnSelected(IGame[] selectedGames) { return; } I want to be able to get selectedGame info on GameStarting event. I have tried different things but haven't managed to achieve it. Im not asking for someone to write me the code, maybe just point me in the right direction please? Im leaning towards using a GameMenuItem plugin and Play() but if a user wants to use the "Launch With" option from the game menu then my plugin im bodging together wont do anything on game launch.
×