Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 6 of 6
  1. #1
    Join Date
    February 2012

    Programically closing TS3 Client

    I am writing a program which uses TS3.
    Launching TS3 is straightforward (using the 'tsserver:?IP/port=' etc command.)
    Afrer the initial connection, moving the 'clientmove' command using the Query language.

    But! I cannot programatically close the TS3 client program.
    Of course, I can 'kill' the process, but that does only stops the program, it does not close down gracefully by disconnecting from any existing connections.

    The most common way to close an app is the Windows function 'CloseMainWindow', but TS3 does not respond to that message.

    Is there a way to safely programatically close the TS3 client app?

  2. #2
    Join Date
    August 2009
    Across the street
    Couldn't you just manually terminate the connections (I believe this can be done, check SDK) and then kill it?

    Unless the devs add a graceful method to terminate the client/server, then I am afraid your choices are slim. Unless you send keys to the client.

    Ctrl-D to disconnect (maybe loop until no longer connected?) client then Ctrl-Q to quit the client.

    Maybe add this to the suggestion forum. It would be nice to programmatically close the client via plugin SDK.

  3. #3
    Join Date
    February 2012
    I am writing an external application which interfaces with the TS3 Client app.
    It can start TS3, using the standard command (e.g. ts3server://x.x.x.x/?port=x&channel=1234). It also uses the ServerQuery to interrogate the TS3 client with simple commands (e.g.for whoami,get channel list, change channel).

    But. My app requires the User is connected to a particular server.
    I cannot find a way to gracefully disconnect the User from their existing server; or to create a new connection to the new server.
    Even attempts to send Windows 'wm_close' commands to the TS3 Window does not close TS3.

    What are my options for programming TS3 Client to do things like:
    1) Close a connection (rather like pressing Control/D, except that this cannot be done if TS3 is minimised).
    2) Exit TS3 without simply 'killing' the Windows Process.

    Thank you.

    --- Merged ---

    As far as I can see, the SDK can only open and close Server connections it has made itself. And sadly, Ctrl-D types of commands are not possible when the TS3 Client app is minimised.
    Thanks for your response. I shall now visit the 'suggestion forum'.
    Last edited by florian_fr40; March 15th, 2012 at 03:25 PM.

  4. #4
    Join Date
    March 2012

    Closing TS3 Remotely


    I am writing an app to control the TS3 client from a windows/.net. I can start TS with the ts3server:// string. I can close an open TS3 using Ctrl D, but I need to either disconnect from server or close the client even if minimised. Does any one know if there is a string command that will close or disconnect from server.

    Any help would be appreciated.


  5. #5
    Join Date
    March 2012

    send Windows 'wm_close' command WORKS for me !

    public static extern int FindWindow(string lpClassName, string lpWindowName);
    public static extern int SendMessage(int hWnd, uint Msg, int wParam, int lParam);
    public const int WM_COMMAND = 0x0112;
    public const int WM_CLOSE = 0xF060;
    int handle = FindWindow("QWidget", "TeamSpeak 3");
    SendMessage(handle, WM_COMMAND, WM_CLOSE, 0);

    But can someone tell me exactly how an external application can remote control the TS3 Client app, please ?

  6. #6
    Join Date
    February 2012
    Thanks for the example code. It may become very useful.
    Some control is available by using creating a network connection to the Client, then using some of the ServerQuery commands.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TS3 is closing.
    By SCHoschKOPP in forum Linux / FreeBSD
    Replies: 10
    Last Post: February 17th, 2013, 11:32 AM
  2. [Resolved] [BUG]Client tries to reconnect afer closing with red cross (program exit)
    By Slater in forum Bug Reports [EN/DE]
    Replies: 3
    Last Post: January 19th, 2011, 08:59 AM
  3. TS client crashed after closing a message window
    By MasterDune in forum Bug Reports [EN/DE]
    Replies: 4
    Last Post: July 23rd, 2010, 10:02 AM
  4. People can reconnect to server after closing client
    By THEEwhiteboy in forum Server Support
    Replies: 15
    Last Post: January 25th, 2010, 09:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts