Jump to content
LaunchBox Community Forums

Auto Hotkey Scripts


Lordmonkus

Recommended Posts

@JoeViking245 Could you help me with something? I think it's the last issue I should need help with.

I have problems with launchbox covering the taskbar when I launch certain games, most likely because they're a different resolution than desktop which is 1920 x 1080. Even though when I quit the game and the resolution reverts back to 1080p launchbox still covers the taskbar. I am able to use a hotkey to make the taskbar show as minimizing it and reactivating it solves the issue.

 

Hotkey, Insert, LaunchUpdate
return

LaunchUpdate: 
WinMinimize ahk_exe launchbox.exe 
WinActivate ahk_exe launchbox.exe 

 

But I want to do it on a loop instead that does it automatically if it happens however only if the script can tell launchbox is covering the taskbar because if not it'll just be winminimizing and activating constantly. Could you help with that?

Edited by Jayinem
Link to comment
Share on other sites

51 minutes ago, Jayinem said:

I have problems with launchbox covering the taskbar when I launch certain games

What happens if you set the LB window to NOT fullscreen, then grab the edges and 'stretch' to where you want the window to be?  aka, it looks fullscreen, but it's technically not.

Link to comment
Share on other sites

7 minutes ago, JoeViking245 said:

What happens if you set the LB window to NOT fullscreen, then grab the edges and 'stretch' to where you want the window to be?  aka, it looks fullscreen, but it's technically not.

You know what it is remember how I was running scripts to keep launchbox fullscreen and where if I minimize or hit the middle winrestore button it would still stay fullscreen (but show taskbar) that script is causing the issue I just figured out.  Because to do what you asked make it not fullscreen I had to close that script, and when I dragged it to cover the entire screen except taskbar, and changed the resolution it did not cover the taskbar. However as soon as I ran the script and changed the resolution it covered the taskbar. Problem is I kind of like the script maybe it could be fixed? This is what I have

 #SingleInstance force
#Persistent

Loop
{
   if WinActive("ahk_exe LaunchBox.exe")
      WinMaximize
}

  

So for some reason this makes it maximize as in cover the taskbar if I change resolutions, but if not it does not which is odd to me.

 

Link to comment
Share on other sites

42 minutes ago, Jayinem said:

So for some reason this makes it maximize as in cover the taskbar if I change resolutions, but if not it does not which is odd to me.

Sounds like you have too many scripts and they're tripping all over themselves. lol

Change your old script to not maximize then.  Try WinRestore instead.

Link to comment
Share on other sites

8 hours ago, JoeViking245 said:

Sounds like you have too many scripts and they're tripping all over themselves. lol

Change your old script to not maximize then.  Try WinRestore instead.

When I do that, it makes it cover the taskbar at all times, even if I click the box in the top right it won't allow it to not cover the taskbar. 😟

I've never had success with the WinRestore command, it's almost like they're backwards restore maximizes and maximize restores. As soon as I change it back to WinMaximize it's back to showing taskbar, unless of course I change resolution.

You having me drag the size of launchbox did seem to help somewhat though. If I change the resolution to 720p it does cover the taskbar, but at least when I change it back to 1080p it no longer does, so is helpful for games that would effect the resolution. I do use 720p for one thing though to stream my PC to my Nintendo Switch, but I don't use it very often.

Edited by Jayinem
  • Like 1
Link to comment
Share on other sites

In case anyone else has that problem of Launchbox covering the taskbar at different times when you don't want it to (because I've seen lots of threads on this forum but no real answers) it's a driver issue. I believe I have it solved by going into Display Settings then choosing Graphic settings and it'll say Graphics performance preference Choose between better performance or battery life when choosing an app. Choose an app to set the preference. Choose your launchbox.exe and in my case I have two GPUs Intel and Nvidia, I choose Nvidia and when it wakes from sleep or when I change resolutions it does not budge from fullscreen with taskbar showing. I even close all ahk scripts which I tried to use to remedy the problem. I've had this issue for several years and could never resolve until (I think/hope) now.

 

Edited by Jayinem
Link to comment
Share on other sites

This question is not Launchbox related, so if I'm told I can't get help for it that's okay. But I'm trying to make a command prompt into a tray icon where it stays open in the tray but I can click on it open it but if I close it it goes back to the tray. I tried every app to do this but all they seem to do is give you a keyboard shortcut to minimize to tray but when you open it you have to do the shortcut again. That's not exactly what I want. Can anyone help?

Link to comment
Share on other sites

This question is not Launchbox related, so if I'm told I can't get help for it that's okay. But I'm trying to make a command prompt into a tray icon where it stays open in the tray but I can click on it open it but if I close it it goes back to the tray. I tried every app to do this but all they seem to do is give you a keyboard shortcut to minimize to tray but when you open it you have to do the shortcut again. That's not exactly what I want. Can anyone help?

I was able to find a script maybe a year ago and modify it that does put it in the tray but it doesn't work properly as I can't open it. I also deleted part of the end of it and made it worse and can't find the original. Maybe the code could be modified.
 

#NoTrayIcon
#Persistent

/* Setup Tray icon and add item that will handle
* double click events
*/
Menu Tray, Icon
Menu Tray, Icon, C:\windows\system32\cmd.exe
Menu Tray, Add, Show / Hide "Client RS.exe", TrayClick
Menu Tray, Add, Close "Client RS.exe", CloseItem
Menu Tray, Default, Show / Hide "Client RS.exe"

;// Run program or batch file hidden
DetectHiddenWindows On
Run "Client RS.exe",, Hide, PID
WinWait ahk_pid %PID%
hBatFile := WinExist()
DetectHiddenWindows Off
return

TrayClick:
OnTrayClick()
return

;// Show / hide program or batch file on double click
OnTrayClick() {
    if DllCall("IsWindowVisible", "Ptr", hBatFile) {
        WinHide ahk_id %hBatFile%

    }
}

CloseItem() {

       DetectHiddenWindows On
       WinWait ahk_class ConsoleWindowClass
       Process, Close, cmd.exe
       DetectHiddenWindows Off
       ExitApp

}

 

Edited by Jayinem
Link to comment
Share on other sites

15 hours ago, JoeViking245 said:

Right-click the file and send it to the Task Bar.

image.thumb.png.bc00dbddd5e54ab6de030da4cd4a0d61.png

Thanks but the app I'm using cmd for is already available on the taskbar. I was wanting it as a tray icon so it would be hidden.

 

Edit: I'm all set, finally found a free app that does what  I want making anything into a tray icon permanently.

Edited by Jayinem
Link to comment
Share on other sites

  • 3 weeks later...
On 11/26/2024 at 2:53 PM, Jayinem said:

@JoeViking245 in RPCS3 how do I have a ahk script that runs a custom configuration for an individual game? I think this was covered somewhere in this thread but it's a long thread.

Wouldn't you instead use command-line parameters to load a custom config?  I don't really use that emulator and would have to look it up if it's even possible.  But I'll let you practice your Googling. ;) 

Pro tip, At the top of this thread, if you type something in the Search box, the default search location is "This Topic".  That should narrow things down.

Pro tip #2, instead of searching the 'regular' Forums, you can Google "LaunchBox what_you're_looking_for".  i.e.  LaunchBox RPCS3 ahk script

Link to comment
Share on other sites

On 11/26/2024 at 4:53 PM, Jayinem said:

@JoeViking245 in RPCS3 how do I have a ahk script that runs a custom configuration for an individual game? I think this was covered somewhere in this thread but it's a long thread.

use the native feature within the emulator. RPCS3 already can do game specific configs and will load them automatically. all it takes is right clicking on a game in the game list and then saving the type of custom config you want

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...