Jump to content
LaunchBox Community Forums

JoeViking245

Moderators
  • Posts

    4,929
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by JoeViking245

  1. 9 minutes ago, skizzosjt said:

    I didn't see the problem with keeping them blank right away because the test script I made was just a test, it had no other code in it to run....but as I looked it over again it dawned on me this approach is problematic. 

    When you place subsequent "blank" hotkeys, they'll all get assigned to command(s) that follow.  Hotkey assignments should also be 'terminated' with a Return. 

    j::
    K::
    l::
    Soundbeep
    return
    
    b::
    n::
    m::
    send joe was here
    return

    Here, j, k and l are all assigned to "Soundbeep".  b, n and m will all type out "joe was here".

     

    j::
    K::
    l::Return
    Soundbeep
    return

    Here, j, k and l are all assigned to Return.  Soundbeep and the last return will never do anything.

     

    SetTitleMatchMode, 2
    #IfWinExist Notepad
    {
      j::Return
      K::
      l::
      Soundbeep
      Send joe was here
      return
    }

    Here, ONLY if Notepad is running, j does nothing. k and l will both sound a beep and also type out "joe was here.  

     

    Hopefully that helps makes the mud more clear. :) 

  2. 1 hour ago, maxforwardspeed said:

    I'm not getting anything (clear logo, videos, etc) for Naomi. Do I need to rename the category for launchbox to see it correctly? Right now the platform is titled "Naomi Cartridge"

    I didn't test with EmuMovies setup for videos, but setting the platform (not to be confused with the term 'category') to Scrape-As Sega Naomi (aka, Naomi cartridges) I was able to get metadata (which you didn't have issues with) and (I only checked) Arcade Cabinet, Clear Logo and Advertisement Front.  For my test, I selected the 1st 6 games, then ToolsDownloadUpdate Metadata and Media for selected games, went through the prompts checking the 3 mentioned images and all was good.

     

    10 hours ago, maxforwardspeed said:

    "Naomi GDRom"

    Same as above except setting the Scrape-As to Sega Naomi 2.

    The Title of the Platform doesn't matter. As long as Scrape As is set.

    image.thumb.png.7baccd9b0d6007ec604606b7f804c170.png

     

  3. 37 minutes ago, Sbaby said:

    I found a solution by entering script  "BlockInput, On" while loading, and "BlockInput, Off"  as soon as the game starts

    You might be able to, in between those "blocks", assign some do-nothing hotkeys for the joy buttons.  I don't know how you set the 'blocks', probably something along the lines of  while game_not_started_yet, BlockInput, On..... then add your joy buttons...  Joy1::Return   Joy2::Return.... etc.

    Then [hopefully] those hotkey assignments only do-nothing 'while loading'.

  4. 35 minutes ago, brett190 said:

    Yes, I do have the window showing up and no videos show up in the menu

    It could be the platform you're in.?.  To test, go to Arcade and select one/several/all games and click Tools>Download>Update Meta Data... and see if they show up then.  (the game 1942 is always a good, all-around test game.)  You can click Cancel afterwards so as to not download what you [may] already have.  Also try [what you did before] and edit an individual game ("1942") and look in the EmuMovies tab.

    If they do show up there, then chances are what you were trying to download the videos for simply doesn't have any (some other platform?).

    If they don't show up there, then it sounds like an in-house issue with either LB, EmuMovies or both.

  5. 14 hours ago, brett190 said:

    Videos are not showing up as an option in Tools>Download>Update Meta Data

    In the Download Metadata and Media Wizard, when you get to the "Would you loke to download media from EmuMovies?" page (next page after "Would you like to download images for your games?"), are any options (check boxes for images or otherwise) showing up?  

    Right now, mines not looking too good. But I'm on my test PC and I may have something screwed up.

    image.png.b86dff039affb44e946df3195a36fe42.png

  6. 2 hours ago, Sbaby said:

    At the moment it didn't work but I added these two lines and it works fine now . It is also perfect with Windows 11. Thank you very much

    Good to know it works on Windows 11.  Thanks.

    If you wanted, you could replace those 3 BigBox lines with just 1 like I showed.  Start ("RunWait") BigBox.exe (or LaunchBox.exe) from within the "Core" subfolder.

  7. 10 minutes ago, Sbaby said:

    I didn't understand what I should do ...

    Right now if I run 1.ahk everything works fine and everything goes black

    Then if I run 2.ahk it restores everything except original wallpaper

    how should i correct them?

     

    OHhhhh..... you removed the semicolon to uncomment the line(s).  Gotch'ya.

    21 hours ago, JoeViking245 said:

    You will still need to have the script running, or save to fore mentioned variables externally to be recalled when restoring.

    The file I attached was a library that you are to make reference from in your original script.  You can reference it by using the #Include statement.  

     

    I suppose you could try to use it the way you did.  But use just one script file.  Uncomment the 2 lines and somewhere in between them, add

    RunWait, "D:\LaunchBox\Core\LaunchBox.exe"

    image.thumb.png.54ef31d134a64522fbe0b327e26bf938.png

  8. 1 hour ago, Sbaby said:

    Wow, that looks great and very interesting 😮
    I did a test on a virtual machine with windows 10. I used your script ToggleAllLibrary.ahk
    I changed it by removing the semicolons from ToggleEverything: = HideDesktop () and magically it's all black ( This is great :) )

    Then I used a second identical script but removing the semicolons from RestoreDesktop (ToggleEverything [1], ToggleEverything [2])

    This brought me everything back to normal...icons, bar, etc except for the desktop background which remained black, instead it should have brought me back the original wallpaper, where did I go wrong? 🧐

    The call to RestoreDesktop doesn't (shouldn't?) have any semicolons.  Removing the semicolon from ToggleEverything changes it from an expression method to a legacy method in which both are different in how they set the array ToggleEverything. So that may have something to do with it.

    Removing the colon from ToggleEverything := HideDesktop() shouldn't have made a difference in "hiding" everything.  But it may make a difference in setting its array (originalWallpaper, origBackground) that are returned from HideDesktop().  If those aren't stored properly (or at all), attempting to run

    RestoreDesktop (ToggleEverything [1], ToggleEverything [2])

    Would be just the same as running

    RestoreDesktop ("", "")

    ..then RestoreDesktop won't know what the originalWallpaper was to restore it.

  9. 2 hours ago, Sbaby said:

    I would like to set a Windows desktop wallpaper when launchbox starts.

    This is for those milliseconds when I occasionally can't cover the desktop for some game loads (They are few but it happens to me).

    But then I would like the Windows 11 wallpaper to return when launchbox / bigbox is closed.


    Is it possible to do this with ahk script?

    This works on Windows 10.  Not sure about Windows 11.  Also, not sure about dual monitors.

    To RESTORE the original wallpaper, you would need to keep the script running until you close LB/BB, or store the originalWallpaper variable to a txt file (or something).

    ; Store original desktop wallpaper (probably has issues with multiple monitors)
    RegRead, originalWallpaper, HKCU\Control Panel\Desktop, WallPaper
    ; Set desktop wallpaper to null (not saved to registry.  Changes will revert after rebooting PC)
    DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, , UInt, 2)

     

    Unless you want a 'special' wallpaper while LB/BB is running, it might be easier to have no wallpaper ("null") and set the background color to black. If your default is something other than black, you'll want to save the origBackground variable as well

    ; Store original background color
    RegRead, backgroundRGB, HKCU\Control Panel\Colors, Background
    StringSplit split, backgroundRGB, " "
    origBackground := % RGB( split1, split2, split3)
    ; Set the background Color to black
    DllCall("SetSysColors", "Int", 1, "Int*", 1, "UInt*", 0)

    And if you're saving (storing) origBackgound,  you'll need this subroutine also.

    ;this subroutine is a part of desktopBackground
    RGB(r, g, b) {
       SetFormat, Integer, Hex
       Return, (r << 16) | (g << 8) | b
    }

     

    Then to restore things after LB/BB closes (again, uses the variables originalWallpaper and origBackground that were saved from before.)

    ; Restore original desktop wallpaper (image)
    DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, originalWallpaper, UInt, 2)
     
    ; Restore the original background color
    DllCall("SetSysColors", "Int", 1, "Int*", 1, "UInt*", origBackground)

     

    If you'd prefer to have all that in a library and just call a function to hide and another to restore, you can call the attached library using #Include.  Instructions are in the file.  You will still need to have the script running, or save to fore mentioned variables externally to be recalled when restoring.

    The library I made actually also hides/restores the desktop icons, taskbar, minimizes all windows as well as the wallpaper/background thing above.  Basically it gives you a black canvas.  So you'll want to comment or delete those portions you don't want out.

    Have fun. :D     ToggleAllLibrary.ahk.txt  (be sure to remove ".txt" if/when you go to use it.)

     

  10. 7 minutes ago, bwunk said:

    Is it possible to change the bezel art that is displayed for a single game?  

    Example: Golden tee'99 has a nice theme bezel with control tips on it, but golden tee 2006 does not so it shows the default "arcade" bezel.  Can I edit the metadata for Golden Tee 2006 to show the same bezel as '99?

    Easiest way (only way?) is to make a copy of the bezel folder for Golden tee '99 (which will be "gt99" [same name as the games ROM file]) and rename it (the copy) to match the name of the [other] ROM you want to also use it for.  If it's Golden Tee Fore! 2006 Complete, the ROM name is "gtfore06".  So the copied folder will be renamed to "gtfore06".

    For stand-alone MAME, the bezel folders are located in the artwork subfolder of your MAME emulator.  Example:   ../Emulators/MAME/artwork/gt99/

  11. 13 hours ago, maxforwardspeed said:

    Looks like another great plugin! My roms are not yet imported into LB and were all in zipped format. I just extracted them but they are now in separate folders named after each game, and the roms are GDI. How should I import these into LB so I can use the plugin?

    Thank you!

    So yours is not really a question about the plugin. I've never imported gdi files nor ROMs that are in individual subfolders.  But I know there's an option when you import ROMs where you can select a folder or files.  In your case a folder (containing the subfolders).

  12. @maxforwardspeed Try adding     ,,Min     to the end of your 2 run lines

    #SingleInstance Force
     
    Run, E😕Emulation\LaunchBox\Sinden\Player 1\[the rest of the long path]\Lightgun.exe,,Min
    Run, E😕Emulation\LaunchBox\Sinden\Player 2\[the rest of the long path]\Lightgun.exe,,Min
     
    ~Esc::
        Process,Close,Lightgun.exe
        Run,taskkill /im "Lightgun.exe" /F
        sleep, 500
        ExitApp
    return

    Edit:  lol  it likes changing : \ when their right next to each other.  But you get the idea ;) 

  13. 11 minutes ago, maxforwardspeed said:

    Unfortunately it doesn't help in my case.

    Was that checkbox even an option for you?  Does it actually start it and send it to the taskbar (if checked)? 

    If you don't use the additional app, does your game start full screen and in focus?

    [With the additional app in place] try disabling the startup screen.  Any change?

    When you have to Alt+Tab to the non-fullscreen game to bring it in focus, can you see what application you're Alt+Tabbing from?  (The application that is stealing focus)

    Is the Alt+Tab thing required in BigBox only? Or do you need to do that when launching the game from LaunchBox as well?

    Can you show the script you're using to launch the Sinden software?

    In the emulator Startup Screen settings that you're using for the game(s) you load the Sinden software with, Is Hide All Windows that are not in Exclusive Fullscreen Mode box checked? Try the opposite.

  14. 9 minutes ago, maxforwardspeed said:

    Do you guys know how to have an AHK run as an additional app to launch software in the background and keep it in the background? I'm running a script to launch Sinden software before games but Launchbox and Bigbox seem to lose focus on actually keeping those apps as background processes, and the game never launches Fullscreen, but I see it below in the taskbar. In Bigbox I have to Alt-tab my way out of a completely black screen, even though all processes are running, just not in the right sequence I guess?

    Does this help?

     

  15. 7 hours ago, Fursphere said:

    On both of my cabinets, there is an entry in Task Manager - Startup for "BigBoxLauncher". 

    Out of curiosity, can you right click and select Open file location or select Properties?  Where/what does it point to (i.e. is it pointing to the ../LaunchBox/ folder? Or somewhere else?)?  What's the date on the executable?  Is there any useful information in the Details tab of Properties?

  16. 10 minutes ago, maxforwardspeed said:

    can you use the plugin to open multiple apps?

    No and yes.  The plugin can create Additional Apps, but Additional Apps can only open one program/executable.  Just like any command line.  But you can create multiple "Start Before Main Application" Additional Apps.  Or like you said, you could create 1 AHK script or 1 batch file that will open your 2 required instances and point to them. 

    25 minutes ago, maxforwardspeed said:

    I'm guessing that's pushing the limits of relying on launchbox to startup.

    Limits? What limits? There aren't no stinking limits. lol

  17. 57 minutes ago, signotime said:

    now the roms of the gamebase extras appear in launchbox but do not start with gblauncher instead any custom emulator works

     

    These go far beyond the scope of this plugin and my personal knowledgebase.

    I'm glad I was able to get the Extras to import for you.  As for getting the games to run, all I can say is good luck and I hope you find out how.

    Thank you for taking the time to test the update.

  18. 2 hours ago, skizzosjt said:

    Unfortunately on my end I have had no luck with using the method detailed in the AHK docs you're asking about. I went about it from every angle and interpretation I could think of without success. I never did get that that MsgBox to show up!

    No worries. Thanks for checking.

     

    2 hours ago, skizzosjt said:

    but I'm not 100% if that is how controllers work

    In this case, the issue is not so much the controller.  It's the "If(state)" line.  Where "state" is, "is something on the controller activated".  A button is pushed. A joystick (thumbstick?) is not at 0,0. etc.

    The script is running "checkForJoy:" every 10 milliseconds. When you press "A", If(state) = True, so it executes whatever is in between the {  }.  

    If you hold down "A", If(state) will = True, If(state.wButtons & 4096) will also = True, so it will 'Send k'.  [In this case] there's nothing else to do inside the 'hotkey label' "checkForJoy".   So nothing more happens.  Until 10 milliseconds later when checkForJoy is activated again.  Guess what.. If(state) equals True.  So it will 'Send k'. Again.  

    It's a vicious, never-ending cycle.  Like you, I tried different Sleep timers, tried changing the SetTimer to different values (which turns out to be pretty much the same as changing the sleep timer).  Looked at several other little things too.  

    So I got creative....

    There is no auto-repeat at all. So if you press and hold "A", you will not (can not) get "kkkkkkkkkkkkkkkkkkkk".  You'll only get "k".  But if you press A,B,X,Y super-fast, you'll get "kpde" typed out.  Super-fast.  Or press "B" 4 time real fast, you'll get "pppp".  As fast as you press the button. :D  

    Spoiler


    #Include Xinput.ahk
    #Persistent
    SetKeyDelay, 0, 50 
    SetTimer, checkForJoy1, 10
    
    checkForJoy1:
    XInput_Init()
    state := Xinput_GetState(0)
    
    TriggerPrev= %Trigger%
    
    If(state.wButtons & 4096)   ;A button
        Trigger=A
    else If(state.wButtons & 8192)   ;B button
        Trigger=B
    else If(state.wButtons & 16384)  ;X button
        Trigger=X
    else If(state.wButtons & 32768)  ;Y button
        Trigger=X
    else If(state.wButtons & 1)      ;D-Pad UP
        Trigger=DUp
    else If(state.wButtons & 2)      ;D-Pad Down
        Trigger=DDown
    else If(state.wButtons & 4)      ;D-Pad Left
        Trigger=DLeft
    else If(state.wButtons & 8)      ;D-Pad Right
        Trigger=DRight
    else If(state.wButtons & 16)      ;Start
        Trigger=Start
    else If(state.wButtons & 32)      ;Back
        Trigger=Back
    else If(state.wButtons & 256)     ;Left Shoulder
        trigger=LShoulder
    else If(state.wButtons & 512)     ;Right Shoulder
        Trigger=RShoulder
    else If(state.bLeftTrigger > 100) ;Left Trigger (range 0 - 255)
        Trigger=LTrigger
    else If(state.bRightTrigger > 100);Right Trigger
        Trigger=RTrigger
    else If(state.wButtons & 64)      ;Left Thumb Click
        Trigger=LThumb
    else If(state.wButtons & 128)     ;Right Thumb Click
        Trigger=RThumb
    else if(state.sThumbLX < -9000 && state.sThumbLX > -32768)
        Trigger=LjoyL
    else if(state.sThumbLX > 9000 && state.sThumbLX < 32767)
        Trigger=LjoyR
    else if(state.sThumbLy > 9000 && state.sThumbLX < 32767)
        Trigger=LjoyU
    else if(state.sThumbLY < -9000 && state.sThumbLX > -32768)
        Trigger=LjoyD
    else if(state.sThumbRX < -9000 && state.sThumbLX > -32768)
        Trigger=RjoyL
    else if(state.sThumbRX > 9000 && state.sThumbLX < 32767)
        Trigger=RjoyR
    else if(state.sThumbRy > 9000 && state.sThumbLX < 32767)
        Trigger=RjoyU
    else if(state.sThumbRY < -9000 && state.sThumbLX > -32768)
        Trigger=RjoyD
    else
        Trigger=
    
    if Trigger= %TriggerPrev%  ; We have not released the previous trigger
        return  ; Do nothing.
    
    ;**************************************************************
    ; Change below here what you want each button/trigger to do
    ;
    ; If you don't want a button/trigger to do do anything, comment
    ; the 2 lines for that "trigger".  
    ;**************************************************************
    
    if Trigger=A
        Send, k
    if Trigger=B
        Send, p
    if Trigger=X
        Send, d
    if Trigger=Y
        Send, e
    if Trigger=DUp
        Send, D-Pad Up
    if Trigger=DDown
        Send, D-Pad Down
    if Trigger=DLeft
        Send, D-Pad Left
    if Trigger=DRight
        Send, D-Pad Right
    if Trigger=Start
        Send, Start
    if Trigger=Back
        Send, Back
    if Trigger=LShoulder
        Send, Left Shoulder
    if Trigger=RShoulder
        Send, Right Shoulder
    if Trigger=LTrigger
        Send, Left Trigger
    if Trigger=RTrigger
        Send, Right trigger
    if Trigger=LThumb
        Send, Left Thumb Click
    if Trigger=RThumbRight joy moved Right
        Send, Right Thumb Click
    if Trigger=LjoyL
        Send, Left joy moved Left
    if Trigger=LjoyR
        Send, Left joy moved Right
    if Trigger=LjoyU
        Send, Left joy moved Up
    if Trigger=LjoyD
        Send, Left joy moved Down
    if Trigger=RjoyL
        Send, Right joy moved Left
    if Trigger=RjoyR
        Send, Right joy moved Right
    if Trigger=RjoyU
        Send, Right joy moved Up
    if Trigger=RjoyD
        Send, Right joy moved Down
    
    return

    The script is a bit longer, but seems to work well.

    • Thanks 1
  19. @signotime Thanks for the files!  That helped a lot.

    I updated the plugin to hopefully accommodate importing AmstradMania (Amstrad CPC) Extras.  The Extras I added in are "Original Disk" (2122 items), "Original Tape" (2670), and "Alt Version" (117).

    I also updated the AHK script to account for the 3 additions.

    This zip file only contains the plugin file (ImportGameBase.dll) and the AutoHotkey script (GBlaunch.ahk).  Unblock the zip file and replace the 2 existing files in your Plugins/ImportGameBase/ folder with these 2 files.  (You should still have the Database2XML.exe file in that folder.  Making up the 3 required files for the plugin to work)

    When you have a chance, would you please test this and let me know your results.  Thanks.

    ImportGameBase (v1.1).zip

     

×
×
  • Create New...