Jump to content
LaunchBox Community Forums

jayjay

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by jayjay

  1. Remove the "KeyWait" lines.
  2. Hopefully: MyFunction: iF ProcessExist("Retroarch.exe") { iF ProcessExist("CDisplayEX.exe") { } else { Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } } else { Winclose, Cdisplayex Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } return
  3. #Persistent #SingleInstance Force #WinActivateForce Gui, +AlwaysOnTop Gui, -Caption ;removes caption and border Gui, color, Black ; sets window color Gui, Add, Picture, W%A_ScreenWidth% H%A_ScreenHeight%, Gui, Show, , Blocker SetTitleMatchMode, 2 WinWait, Cdisplayex WinSet, Transparent, 0, ahk_exe CDisplayEx.exe WinWait, RetroArch VICE WinActivate, RetroArch VICE Sleep, 200 Gui, -AlwaysOnTop Gui, Hide Hotkey, ~NumpadSub & NumpadEnter, Function1 SetTimer, MyFunction, 1000 Loop { if WinActive("ahk_exe Cdisplayex.exe") { Zoom() } } ProcessExist(Name){ Process,Exist,%Name% return Errorlevel } Return Function1: run, nomousy.exe /hide Gui, Show, , Blocker SetTitleMatchMode, 2 WinSet, AlwaysOnTop, On, ahk_exe CDisplayEx.exe WinActivate, Cdisplayex WinSet, Transparent, 0, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 20, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 40, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 60, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 80, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 100, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 120, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 140, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 160, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 180, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 200, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 220, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 240, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, Off, ahk_exe CDisplayEx.exe Gui, Hide Hotkey, ~NumpadSub & NumpadEnter, Function2 Gui, Show, NA, Blocker WinSet, AlwaysOnTop, Off, ahk_exe CDisplayEx.exe Return Function2: SetTitleMatchMode, 2 WinSet, Transparent, 240, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 220, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 200, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 180, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 160, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 140, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 120, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 100, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 80, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 60, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 40, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 20, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 0, ahk_exe CDisplayEx.exe Gui +AlwaysOnTop Sleep, 250 WinActivate, RetroArch VICE Sleep, 250 WinSet, AlwaysOnTop, On, ahk_exe CDisplayEx.exe Gui -AlwaysOnTop Gui, Hide run, nomousy.exe Hotkey, ~NumpadSub & NumpadEnter, Function1 Return MyFunction: IF ProcessExist("Retroarch.exe") { IF ProcessExist("CDisplayEX.exe") {} Else { Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } } Else { Winclose, Cdisplayex Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } } return Zoom() { if (GetKeyState("1Joy5") == 1) { Send - KeyWait 1Joy5 } if (GetKeyState("1Joy6") == 1) { Send = KeyWait 1Joy6 } if (GetKeyState("2Joy5") == 1) { Send - KeyWait 2Joy5 } if (GetKeyState("2Joy6") == 1) { Send = KeyWait 2Joy6 } if (GetKeyState("3Joy5") == 1) { Send - KeyWait 3Joy5 } if (GetKeyState("3Joy6") == 1) { Send = KeyWait 3Joy6 } if (GetKeyState("4Joy5") == 1) { Send - KeyWait 4Joy5 } if (GetKeyState("4Joy6") == 1) { Send = KeyWait 4Joy6 } if (GetKeyState("5Joy5") == 1) { Send - KeyWait 5Joy5 } if (GetKeyState("5Joy6") == 1) { Send = KeyWait 5Joy6 } if (GetKeyState("6Joy5") == 1) { Send - KeyWait 6Joy5 } if (GetKeyState("6Joy6") == 1) { Send = KeyWait 6Joy6 } if (GetKeyState("7Joy5") == 1) { Send - KeyWait 7Joy5 } if (GetKeyState("7Joy6") == 1) { Send = KeyWait 7Joy6 } if (GetKeyState("8Joy5") == 1) { Send - KeyWait 8Joy5 } if (GetKeyState("8Joy6") == 1) { Send = KeyWait 8Joy6 } } return
  4. if @JoeViking245 code works cool, id use that. With my last example you could replace thee loop with: Loop { if WinActive("ahk_exe Cdisplayex.exe") { SomeOtherFunction() } } Then at bottom of script the function would look something like: SomeOtherFunction() { if (GetKeyState("1Joy5") == 1) { Send - KeyWait 1Joy5 } if (GetKeyState("1Joy6") == 1) { Send = KeyWait 1Joy6 } } return
  5. Could try putting loop in a timer and use getkeystate: #Persistent #SingleInstance Force #WinActivateForce Gui, +AlwaysOnTop Gui, -Caption ;removes caption and border Gui, color, Black ; sets window color Gui, Add, Picture, W%A_ScreenWidth% H%A_ScreenHeight%, Gui, Show, , Blocker SetTitleMatchMode, 2 WinWait, Cdisplayex WinSet, Transparent, 0, ahk_exe CDisplayEx.exe WinWait, RetroArch VICE WinActivate, RetroArch VICE Sleep, 200 Gui, -AlwaysOnTop Gui, Hide Hotkey, ~NumpadSub & NumpadEnter, Function1 SetTimer, MyFunction, 1000 ;put previous loop in timer, bottom of script Loop { KeyIsDown := GetKeyState("z") if (KeyIsDown == 0) ;key not down { } else ;key is down { if WinActive("ahk_exe Cdisplayex.exe") { Send, - msgbox "im sending -" } else { Send, z msgbox "im sending z" } KeyWait z } } ProcessExist(Name){ Process,Exist,%Name% return Errorlevel } Return Function1: run, nomousy.exe /hide Gui, Show, , Blocker SetTitleMatchMode, 2 WinSet, AlwaysOnTop, On, ahk_exe CDisplayEx.exe WinActivate, Cdisplayex WinSet, Transparent, 0, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 20, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 40, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 60, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 80, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 100, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 120, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 140, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 160, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 180, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 200, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 220, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 240, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, Off, ahk_exe CDisplayEx.exe Gui, Hide Hotkey, ~NumpadSub & NumpadEnter, Function2 Gui, Show, NA, Blocker WinSet, AlwaysOnTop, Off, ahk_exe CDisplayEx.exe Return Function2: SetTitleMatchMode, 2 WinSet, Transparent, 240, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 220, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 200, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 180, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 160, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 140, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 120, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 100, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 80, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 60, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 40, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 20, ahk_exe CDisplayEx.exe Sleep, 10 WinSet, Transparent, 0, ahk_exe CDisplayEx.exe Gui +AlwaysOnTop Sleep, 250 WinActivate, RetroArch VICE Sleep, 250 WinSet, AlwaysOnTop, On, ahk_exe CDisplayEx.exe Gui -AlwaysOnTop Gui, Hide run, nomousy.exe Hotkey, ~NumpadSub & NumpadEnter, Function1 Return MyFunction: { IF ProcessExist("Retroarch.exe") { IF ProcessExist("CDisplayEX.exe") {} Else { Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } } Else { Winclose, Cdisplayex Gui, Hide run, nomousy.exe Sleep, 500 Process, Close, nomousy.exe ExitApp } }
  6. If you put this at the top of the script and you have "return" then whatever is after the return wont get executed? Long time since I played with ahk. Cant you just: $z:: if WinActive("ahk_exe Cdisplayex.exe") //might need to check the quotes are correct { Send, - msgbox "im sending -" //check to see if button press is working } Else { Send, z msgbox "im sending z" } Return At the bottom of script?
  7. Yeah .net core works. To fix system drawing error. Install system drawing 5.0. Once installed open project file and replace: <ItemGroup> <PackageReference Include="System.Drawing.Common" Version="5.0.0" /> </ItemGroup> to <ItemGroup> <PackageReference Include="System.Drawing.Common" Version="4.7.0" /> </ItemGroup> works for me. Edit: I didnt read your post properly. I haven't had any issues with security rights. Not sure if my solution will work for you.
  8. Try changing your path to C:\Games\Emulators\LaunchBox\Core\BigBox.exe
  9. Hey @The_Keeper86. Im currently working on moving this to .net core and improving on it a bit. It will take me some time though.
  10. I guess from your explanation the way this currently behaves is: LB/BB hides/changes the mouse on game start up. When you exit the first .exe the plugin + ahk combination changes the mouse back. Having the mouse show on pause screen would annoy me. Maybe if the mouse isnt to big you could use a move mouse command to hide the mouse in the corner of screen.... i dunno. Might be tricky trying to have 1 script catch all. Yeah your right. Sorry was being a bit thick. LaunchScript.zip This plugin you can have the following scripts: OnAppExit.ahk - will work for both LB/BB OnAppExitBB.ahk OnAppExitLB.ahk OnStartupCompleted.ahk - will work for both LB/BB OnStartupCompletedBB.ahk OnStartupCompletedLB.ahk OnAfterGameLaunched.ahk - will work for both LB/BB OnAfterGameLaunchedBB.ahk OnAfterGameLaunchedLB.ahk OnGameExit.ahk - will work for both LB/BB OnGameExitBB.ahk OnGameExitLB.ahk If you have say OnGameExit.ahk and you have OnGameExitBB.ahk in your Autohotkey directory, both scripts will launch when a game is exited. If you have say OnGameExitLB.ahk and you have OnGameExitBB.ahk in your Autohotkey directory, only 1 script will launch depending on if your using BB or LB. Maybe overkill for what your trying to achieve but figured others could use it for something different. If you do need to handle it differently for BB/LB, it would prob be better to do it in ahk: args = %1% Array := StrSplit(args , "|") platform := Array[1] gamePath := Array[2] emuPath := Array[3] isBigBox := Array[4] if (isBigBox == "true") { ;is bigbox } else { ;is launchbox } Can capture the above using the GameExit and AfterGameLaunch scripts. Anyway theres a few options, i'll leave it to you to come up with the best method.
  11. @Mr.Laor are you using a badge plugin created with my custom badge creator? Iv just tested a badge on my mame collection and although memory usage is similar to normal, seems the cpu goes a bit haywire. Edit: actually scratch that, only goes a bit crazy when loading a platform then settles again.
  12. The last plugin has "script not found" error message pop up when it doesnt find one of the scripts. Sorry about that use this one instead: LaunchScript.zip 1. Yeah the OnAppExit does fire when switching between LB and BB. 2. I think OnGameExit happens as soon as you exit the game. I dont think LB unhides the mouse until the game over screen disappears. @DrGrizzPHD posted a method for the steam/windows games, should work for all games, with the OnGameExit issue over here,: So if we nick that script and add the stuff you need it should look something like this: Sleep, 3000 ; Wait three seconds for the game to launch MouseMove, 1920, 500 ; move the mouse to the middle of the screen instead of the corner to prevent the title/start bar from appearing Sleep, 10000 ; wait 10 seconds for good measure to make sure the game is loaded and is the active window, this could probably be reduced WinGet, active_id, ID, A ; get the ID of the active window WinWaitClose, ahk_id %active_id% ; wait for the active window to close Sleep, 500 ; wait half a second, this might not be needed either if WinExist("LaunchBox Game Startup") { WinActivate WinWaitClose, LaunchBox Game Startup } if WinExist("LaunchBox") { ;maybe add another sleep here WinActivate Goto, ChangeItBack } if WinExist("LaunchBox Big Box") { ;maybe add another sleep here WinActivate Goto, ChangeItBack } return ChangeItBack: ;************* here RegRead, output, HKEY_CURRENT_USER\Control Panel\Cursors, ChangeCursorScheme("%output%") ChangeCursorScheme(Scheme){ KeyNames := ["Arrow", "Help", "AppStarting", "Wait", "Crosshair", "IBeam", "NWPen", "No", "SizeNS", "SizeWE", "SizeNWSE", "SizeNESW", "SizeAll", "UpArrow", "Hand"] KEYpath := "HKEY_CURRENT_USER\Control Panel\Cursors" RegRead, SchemeVals, HKEY_CURRENT_USER\Control Panel\Cursors\Schemes, %Scheme% if(!SchemeVals){ RegRead, SchemeVals, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes, %Scheme% } SchemeVals := StrSplit(SchemeVals, ",") if(SchemeVals.Length() > 0){ RegWrite, Reg_SZ, %KEYpath%, , %Scheme% } for index, val in SchemeVals { if(index < KeyNames.Length()){ RegWrite, Reg_Expand_SZ, %KEYpath%, % KeyNames[index], %val% } } DllCall("SystemParametersInfo", "UInt",0x0057, "UInt","0", "UInt",0, "UInt","0") } ExitApp ;*********************** and don't forget this Rename this script to OnGameExit.ahk and see if it works for all games.
  13. You gave 5 options haha. This plugin: LaunchScript.zip All it does is launch the .ahk using LB built in autohotkey so dont need to compile the ahk. Unblock the zip and extract the dll to Launchbox/Plugins. You need to place your script in Launchbox/Third Party/Autohotkey/. If you want the script to launch when BB/LB starts up rename your script to "OnStartupCompleted.ahk". If you want the script to launch on game exit rename your script to "OnGameExit.ahk". If you want the script to launch on BB/LB closing rename your script to "OnAppExit.ahk". If you want you can use all 3 at the same time. Also I keep forgetting, when using onGameExit... if you play a windows or steam etc game, where you launch an exe that passes on to another exe, on game exit wont work correctly. The game exit event fires when the first exe closes. Im not sure what effect it will have on your mouse. If you want to get a bit fancy (hacky?) with your game exit script you can capture the launching games platform, games application path and emulator path with the following: args = %1% Array := StrSplit(args , "|") platform := Array[1] gamePath := Array[2] emuPath := Array[3] Also if using one of the on exit options you might want the script to sleep for a few seconds until LB/BB unhides the mouse.
  14. If this issue only occurs when a game is launched you could use my regain focus plugin to launch the script on game exit. If it occurs without launching a game I nominate @JoeViking245 (haha) to copy my plugin but use the BigBoxIsClosing and LaunchBoxIsClosing event to launch the script on LB/BB closing.
  15. I have given this some thought but with my limited knowledge I cant come up with a decent method to achieve this. Writing to the xaml files either every 5 seconds or every button press isnt a good idea. Even if it was the view you would currently be sitting at wont change the image. You would need to use a usercontrol. My plugin that launches apps from the system view is a usercontrol. Using a plugin I dont think there is a way to tell which view you are on and as you want a different image for each view, every view would require its own usercontrol. To be able to press a button on 1 view and have the image change on another view will require static variables. To change this static variable automatically every 5 seconds would require a timer. From what I read changing static variables from a timer (different thread) isnt a good idea... I cant create images on another thread anyway so will have to invoke... invoking that amount of images every 5 seconds... maybe instead use a string/int to point to a different path and use the loaded event ? I could do this but at the moment I wouldn't be confident that iv done it well. If anyone with more knowledge than me wants to chime in with a good method to achieve this then I'll give it a go. But creating a ui for this, im def not up for. When me and my gf are "getting busy", I now use "xaml" as my safe word. ?
  16. Hey @JaysArcade. I dont have even 1 theme created with the theme editor... Could I trouble you to pack up the platform xamls for that theme and if you have any more themes that you know were made with the editor and post them to us please.
  17. Im not sure how it will react in attract mode. I'd imagine that it will jump to the game view and the plugin wont have any impact on it. Could you test it and report back what happens. Using the api we can know when BB is in attract mode. If it does jump to game view... Could make a plugin that detects when it is inside "JukeBox" game view and have it jump back to platform view but you would prob get a nasty flash on the screen and also not sure how attract mode will react to it, might stop it. If I was using this plugin and attract mode does jump to game view what I would do is... Go to the themes views folder. Create folders for the game views Launchbox/Themes/My theme/Views/HorizontalWheel1GamesView/ and copy the corresponding xaml's there, rename the xaml to JukeBox.xaml. Modify the xaml, removing the wheel, Images pretty much everything that moves and have a background image or whatever so when attract mode is doing its thing it just displays an image for jukebox for x amount of time until it jumps back.
  18. Download this: LaunchPlatform.zip Unblock it. Move the "LaunchPlatform" folder to Launchbox Plugins. Step 1 Now go to Launchbox/Themes/The theme your using/Views. Find the "PlatformWheelFiltersView.xaml" your using and make a backup. Backup all platform xamls if you use all of them. Open the platform.xaml in notepad and add this line: xmlns:LPlat="clr-namespace:LaunchPlatform;assembly=LaunchPlatform" Near the top like so: Add the following line: <LPlat:LPControl /> Near the bottom, just above </Canvas> Like so: Save it. Step 2 Open Launchbox. Go to tools, manage platforms and add a platform. Name the Platform whatever you want. (Lets say Kodi) Add your app (Kodi) to this platform. Close LB so th data saves to file. Go to Launchbox/Data/Platforms and open the new platforms xml file (Kodi.xml) in notepad. Go to Launchbox/Plugins/LaunchPlatform and open PlatformApps.txt. Copy the platform name to the txt file. Add the character "|" (Bar) next to the platform name. Then find the ID and copy it over, like in the image above. Save the txt. Start BB and launch from the platform level. If you want to add more apps, follow from step 2 but add another platform name, Bar character and Id to a new line under the top line in the PlatformApps.txt. I havent tested this a great deal though.
  19. Am chiming back in to say: Iv just tested mashing the buttons going from "Options" to "SystemView". Using a plugin I can then block going to "Platform View" even when mashing the buttons. I havent tested the scenario above, maybe that works now as well. Also: I can use the "BigBoxStartupCompleted" event and the "ShowSystem" method to jump straight to "SystemView". BigBox is so cool. Im enjoying adding stuff to system view.
  20. This plugin requires some theme modification and is only compatible with SystemViews where the menu (back,options,manage themes,etc) is on the left side. How to install. Download this: SystemViewApps.zip Unblock it. Put SysMenu.dll in Launchbox/Plugins Go to Launchbox/Themes/"The theme your using"/Views/... and make a backup of SystemView.xaml. If you are familiar with modifying themes: Open your SystemView.xaml and add the following line: xmlns:sysM="clr-namespace:SysMenu;assembly=SysMenu" Near the top like so: And inside the grid add the following line <sysM:SysMenuControl Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Panel.ZIndex="2" /> Change the Column, ColumnSpan, ZIndex as needed. If you are not familiar with modifying themes: You can download this default theme SystemView.xaml which will work with any theme: SystemView Xaml.zip Replace your themes SystemView.xaml, dont forget to backup your SystemView.xaml in case you want to revert back. The image at the top of this thread is the default SystemView. If you want to use your themes SystemView, go to Launchbox/Themes/Your theme/Views/. And post the SystemView.xaml on this thread and i'll modify it for you. How to add apps. Open Launchbox, go to tools, manage platforms... and add a new platform. Name this platform exactly "System Menu Apps". What ever apps you add to this platform will show up in the system view. Add a "Box Front" image to your apps. Square images look best. Set all apps that you add to the "System Menu Apps" platform to hidden so it doesnt display the platform in BB's platform wheel view.
  21. I attempted something like this. The idea was.. Add a platform called "Kodi". If a user selects kodi from the platform level, can use the plugin to launch kodi and also block the transition to the game level. It mostly works but I found that if I went from "systemview" (the view with options, manage themes, exit, etc) and you mash the buttons back to platform view and keep mashing the buttons, it would jump to game view with the plugin seemingly not loading quick enough to block the transition. I think if I ever get round to completing half the shite I start I'll use the unused space on systemview to launch things like kodi and spotify etc. Would be cool to get a "Start from Systemview" option in BB.
  22. Hey @silverchair Iv looked through my 68 psn games and added the following to the importer: string str = title; if (str.EndsWith(" - Trial Version")) { str = str.Substring(0, str.LastIndexOf(" - Trial Version")); } if (str.EndsWith(" Trial Version")) { str = str.Substring(0, str.LastIndexOf(" Trial Version")); } if (str.EndsWith(" - Trial")) { str = str.Substring(0, str.LastIndexOf(" - Trial")); } if (str.EndsWith(" Trial")) { str = str.Substring(0, str.LastIndexOf(" Trial")); } if (str.EndsWith(" Demo")) { str = str.Substring(0, str.LastIndexOf(" Demo")); } If the title ends with any of the examples above, it'll remove it from the end of the title. PS3GameImporter.zip Just replace the dll. Edit: Obviously if the game title actually ends with one of these words as part of its proper title, Trial maybe being the only one, it will be removed.
  23. Im guessing @TimberlAndRE is trying to make changes to the xml file outside of LB and then reload the files. I dont think RefreshData() will work. I havent really used the reload methods but if I remember correctly you want to be careful with it. I think if the user makes any changes to their collection without saving (closing LB), them changes will be lost when calling reload. Maybe you can call a save method before reload but im not expert, not sure if its wise to do it.
  24. Version 2 Download: LB Custom Badge.zip How to use: Extract it anywhere. But NOT the Launchbox/Plugins directory. Open "LBCustomBadge.exe". Select a tab, fill in the fields and press compile. Note: the example images below have an "Index" option. This option is actually set by Launchbox so it has been removed from the app. When you press compile a command window will pop up. If the compile is successful your command window will look something like: If this command window contains any text that is red, it has failed to compile. I have tested about 20+ badges with no problems, if you come across any issues just reply on this thread with what options you selected. After the text "0 warnings" and "0 errors" appear, close the command window, at which point you will find the dll in the same directory as "LBCustomBadge.exe". Additional Apps, Controller, Custom Field, Emulator, Game, Platform: If you have used the previous version, you will already know how to use these options. If you haven't used the previous version scroll to the bottom of this post for some examples. Advanced: this option uses c# code to make multi condition badges. As an example here is how to do 2 conditions for the "Game" badge type. We are going to display a badge for when a games playcount is above 20 and favourite equals true: First we select the options for our playcount condition: Then click the "Refresh" button to display the code: Highlight and copy the code that is in the textbox and click on the advanced tab, paste the code into the textbox: As we want the playcount to be above 20 "AND" we want favourite to equal true we need to add the c# code for "AND". The c# code for "AND" is two ampersand characters "&&" . We add the two ampersands like so: NOTE: if instead of "AND" we wanted "OR". playcount is above 20 "OR" favourite equals true. the c# code for "OR" is two bar characters "||": END OF NOTE Now we want to add our "favourite is true" condition so go back to the game tab, select "Favourite" from the drop down and select the true checkbox. Press refresh to display the code: Copy the code thats in the textbox and paste it in the "Advanced" tab textbox: Now while still on the advanced tab press compile and you will get a badge for your 2 conditions game badge. Each badge type can have vastly different code. There are to many different ways to add the code for me to explain them all. So if you want the code for a great badge idea you have what you do is... You tag JoeViking245 like so: @JoeViking245 and you say "please joe, give me the code for my cool badge idea" and he will reply with the code. ? Dont be shy in asking on this thread on how to display a badge for multiple conditions. And also be warned, if you decide to create crazy looking code like so: Don't be surprised when your platform takes a long time to load. Version 1 I spoke to @Mr.Laor, the poster of this thread above. He assured me no one was working on this. If any coder is working on this in the hope of getting paid, let me know and i'll happily remove this. Download this: LB Custom Badge.zip Extract it anywhere. Open "LB_Custom_Badge.exe". Fill in the fields and press compile. After you get the "compile complete" message box. Look in the same folder as "LB_Custom_Badge.exe" for a .dll file. Move that .dll into Launchbox/Plugins and restart launchbox and enable the badge. I made this app to give myself a break from other stuff and to see if I could do it. It doesn't look pretty, it just does a job. That being said I will fix any bugs but im not looking to give anymore time adding stuff to this. What you see is what you get. Some examples on how to use this: Lets say you want a badge to display for the games that have a custom field named "My Opinion" and the value is "Poo": Badge Name: This is the name that is displayed in LB: Unique Id: Give your badge a unique Id. Image: The badge image (displayed in the red circle above). Point the path to a png or jpg. (if you press compile and you get the "compile complete" message but no dll, 1 reason could be that the image isnt a valid png or jpg, As an example dont rename a .webp to .png and try to compile, it wont work). Index: needs to be a number. Im not entirely sure what this is for but I guess if you have multiple badges enabled, this field is what position to display the badge at?. Badge Type: In this case we want custom field. Other choices are Game, Platform (the games platform) and Emulator (the games default emulator). Name: The name of your custom field as it appears in LB. Matching type: (I suck at explaining things) In this case we want a badge to display for our "My Opinion" custom field, where the Value "Equals" Poo. Matching is case sensitive. (Maybe someone else can jump in and explain this better than me ?) Value: Your custom fields value as it appears in LB. Another example: Lets say you want to display a badge for every game that was released between 1700 and 1800 (18th century) So you would want to select "Game" as your badge type. The property is the games "ReleaseDate" and the value: You want the games release date to fall between the 31st of December 1699 (start date) and the 1st of January 1800 (end date). 1 more example. You want to display a badge for every game that uses retroarch as its default emulator. You want the "Emulator" => "ApplicationPath" => to "EndWith" => "retroarch.exe". (Again the value is case sensitive, so if your retroarch's .exe file is named "Retroarch.exe" it wont match).
  25. I would use copy and always have a backup of the original files in case mistakes are made. Being sure you can always recover from an error is more important than hdd space. Im just a hobbyist coder as well, if I can help it I try not to mess with other peoples files as much as possible. But iv learnt not to try and be clever with it, keeping it simple is best. If i was making this for myself I would keep the files in their own directories: Root/Mods/Mod 1/files Root/Mods/Mod 2/files Original Backup/files an so on. Every time I launched a mod I would have something like this: if (modFile overwrites originalFile) { if (BackUp directory does not contain originalFile) { Backup originalFile } } FileCopy, blah, blah, true This way you should always have a backup of the original files no matter what mod has been launched.
×
×
  • Create New...