Minimize window to tray and keep it there.. if you need it

Discussion in 'other software & services' started by Sully, Nov 3, 2010.

Thread Status:
Not open for further replies.
  1. Sully

    Sully Registered Member

    Dec 23, 2005
    I had a guy who wanted to pay me a somewhat ridiculous amount of money to get rid of a teamspeak 3 console window. He wanted it in the tray. I told him he could do it for free and them some... he took me up on the offer :cautious:

    So here is what I did. Some of you might find some uses for this, who knows.

    First I set up xyntService to start TeamSpeak3 as a service. The project is located here

    Then I copied the .exe and renamed it to ts3service.exe and place it in c: root. Next I made a ts3service.ini file, with this in it located in c: root.
    CheckProcessSeconds = 30 
    CommandLine ="C:\Program Files\Teamspeak3\ts3server_win32.exe"
    WorkingDir= "c:\Program Files\Teamspeak3"
    PauseStart= 2000 
    PauseEnd= 1000 
    UserInterface = Yes
    Restart = Yes 
    UserName = 
    Domain =
    Password =
    Then to install the service it is simple: c:\ts3service.exe -i
    Now TeamSpeak3 starts up on reboot and if it is closed, will reopen in 30 seconds.

    To get rid of the console window I made an AutoIt script and called the compiled executable "mindows.exe". Here is the code for that
    ; uncomment below to fetch the states of target window
    ; be sure window title is correct
    ;~ MsgBox(0,'state:',WinGetState('C:\Program Files\Teamspeak3\ts3server_win32.exe'))
    ;~ Exit
    ; 7 is open but not active
    ; 15 is open and active
    ; 21 is minimized
    While 1
    	$state = WinGetState('C:\Program Files\Teamspeak3\ts3server_win32.exe')
    	If $state = 7 Or $state = 15 Then
    		WinSetState('C:\Program Files\Teamspeak3\ts3server_win32.exe','',@SW_MINIMIZE)
    		WinWaitActive('C:\Program Files\Teamspeak3\ts3server_win32.exe')
    I had this mindow.exe start with common startup directory.

    Since he wanted the consold to go to tray, not just to taskbar, I got a copy of TrayIT. It is a nice standalone app. Ran it, told it to startup with system, added the console window. Now when the window becomes active, the mindow.exe minimized it, but trayIt places it in the tray.

    Thats about a 15 minute fix for a problem that has evidentily been bugging him for a year. I should have taken the money, but I haven't the time to mess with that right now.

    Maybe someone can benefit from this, who knows.

Thread Status:
Not open for further replies.