Author Topic: Hide/restore Steam from tray only, without lag?  (Read 786 times)

josephrooks

  • Newbie
  • *
  • Posts: 1
Hide/restore Steam from tray only, without lag?
« on: May 26, 2020, 08:27:54 AM »
I know ProcessExists is a thing, but I'm not very experienced with variables or programming in general outside of HTML/CSS so I'm having a tough time figuring out how to make use of it.

Basically, if I point VoiceAttack at the Steam executable and it's already running but minimized to the tray, it might eventually launch but it'll take a very long time compared to clicking the icon in the tray.

I know from doing research that when things are minimized to the tray, the "window" stops existing, so is there a fast way to target the process and tell that to restore maximized?

I have a couple of other apps like that, but I am hoping if I get an explanation for Steam I can study that and try to figure out the other ones myself.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Hide/restore Steam from tray only, without lag?
« Reply #1 on: May 26, 2020, 01:53:37 PM »
There is no standard for restoring a window from the system tray, just as there is no real standard for minimizing a window to the system tray.


Unless the application you're targeting specifically offers a method for doing so programmatically, you'll have to use the system tray icon (as you would manually, I.E. clicking it or using the keyboard, both of which will be problematic if the position of the icon changes) to bring up its window.

blindside_o0

  • Newbie
  • *
  • Posts: 7
Re: Hide/restore Steam from tray only, without lag?
« Reply #2 on: May 05, 2022, 09:22:19 AM »
I'm gonna unbury this thread to ask a further question since this is the first thread that seems to link with my question. What about reopening voice attack itself? If I recall correctly there was a command in the first startup profile that would show my voice attack settings window. I would like to have this pop up but it too is in the system tray. Is this integrated into the voice attack actions somewhere?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Hide/restore Steam from tray only, without lag?
« Reply #3 on: May 05, 2022, 10:23:20 AM »
If I recall correctly there was a command in the first startup profile that would show my voice attack settings window.
There is no such command in the default example profile.


The main window for VoiceAttack itself can be restored from the system tray using an inline function action with these contents:
Code: (C#) [Select]
public class VAInline
{
public void main()
{
VA.Utility.RestoreUI();
}
}


Opening the VoiceAttack options window would require clicking the wrench icon on the main window.


If you're referring to the options window of a third-party addon, which often use a keyboard shortcut configured to trigger a VoiceAttack command which opens said window, that would also need to be opened manually (unless the authors of the profile provide an alternative method), as keypresses VoiceAttack sends are prevented from triggering VoiceAttack commands to prevent unintended effects.