Sign in to follow this  
Followers 0
mother9987

Teamspeak functions for autoit

12 posts in this topic

#1 ·  Posted (edited)

Threw this together for myself. Figured there was a slight possibility it could be useful for someone else.

They're written using the beta 3.1.1.25 version of AutoIT, so if the functions stop working, don't blame me :(

Anyhow, enjoy. Or not as you see fit.

Edit: you'll need to get a copy of TSRemote.dll from the teamspeak site www.goteamspeak.com or google tsremote.dll.

TSRemote.au3

Edited by mother9987

Share this post


Link to post
Share on other sites



I was actually working on a script earlier today, I was trying to port it from Perl. The thing I couldn't figure out is how to tell how long a person has been 'idle'. If you know how to do that, by either dll or a straight TCPConnect() (Telnet) command, I would greatly appreciate it.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

Thank you Mother!

Share this post


Link to post
Share on other sites

Glad you like it, Tyger

And sorry, Fanboy, I don't know how to get any more information out of the client than the functions I put in there. And player idle time isn't one of the stats returned. If the perl code you're converting from has a function that returns idle time, put it up and I'll try to figure it out... but can't guarantee a time frame because I'm trying to work on the program I needed the teamspeak functions for :(

Share this post


Link to post
Share on other sites

I'm figuring it out now that I have a TS Server running on this desktop. You have to telnet to port 51234 (default, TCPQueryPort INI field) and send commands. typing 'help' gives a complete list of commands. I'm going to work on this.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

Cool, happy to see people making use of DllStruct...


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

Cool, happy to see people making use of DllStruct...

<{POST_SNAPBACK}>

DllStruct is one sexy function, and thanks a lot for the help getting it working in my odd case.

I switched to your example code because while my code worked after you changed the function, it was taking about 5 seconds to pull the channel information. Didn't time it to see where the delay was, though. Just thought you should know.

Share this post


Link to post
Share on other sites

Here's the code for kicking all idling users:

It will kick ALL users who idle for 1 minute.

Basically, it enters the following commands into a dos console:

Create a connection:

telnet 127.0.0.1 51234

Select the default server:

sel 8767

Login as superadmin:

slogin superadmin 3lxpbl

Send idle kick command (ki minutes code reason):

ki 1 15 some reason

and then quit the connection...

Here you go!

$start = 0
While $start = 0
$start = TCPStartup()
WEnd
MsgBox(0, "test", $start)
$socket = TCPConnect("127.0.0.1", "51234")

Do
sleep(100)
Until $socket <> 0
TCPSend($socket, "sel 8767" & @CRLF)
;sleep(1000)
TCPSend($socket, "slogin superadmin 3lxpbl" & @CRLF)
;sleep(1000)
TCPSend($socket, "ki 1 15 some reason" & @CRLF)
;sleep(1000)
TCPSend($socket, "quit" & @CRLF)
;sleep(1000)
TCPCloseSocket($socket)
TCPShutdown()

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

im curious ... is there a use for this except for admins?

I use ts and I dont wana miss the obvious.

Wish they did this for vent tho..


Share this post


Link to post
Share on other sites

Not that I'm aware of. It's usually reserved for Server Admins (SA)s, however, probably anyone could login if they have permission (I don't know if CAs or Rs can login through telnet). I don't see a benefit for anything other than server administration/automation.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

im curious ... is there a use for this except for admins?

I use ts and I dont wana miss the obvious.

Wish they did this for vent tho..

<{POST_SNAPBACK}>

My functions control the TS client. They allow connecting to the server and switching channels and stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0