xzaz Posted May 23, 2007 Share Posted May 23, 2007 (edited) Hi there, this is one of my first (complete) scripts. It is a autoit TS admin client controled Through Telnet. expandcollapse popup;Script by Xzaz => www.xzaz.nl #include <GUIConstants.au3> #include <array.au3> #Include <GuiList.au3> Opt("GUICoordMode", 1) ;Setting the vars $Line = 0 $IP = "192.168.0.1" ;IP to connect $Port = "51234" ; Port to connect $waittime = 100 ;Howmuch ms for refresh resv ;Globals Global $recvwin Global $begin ;Startup the TCP/UDP TCPStartUp() $socket = TCPConnect( $IP, $Port ) ;Create GUI GUICreate("Teamspeak",410,300) $input = GUICtrlCreateInput("Type: 'Help' for commands",10,5,200,25) GUICtrlSetState(-1,$GUI_FOCUS) $recvwin = GUICtrlCreateEdit("",10,30,400,270) $butt = GUICtrlCreateButton("Send",220,5,80,20) GUICtrlSetState(-1,$GUI_DEFBUTTON) $butt_reset = GUICtrlCreateButton("Reset",310,5,80,20) GUISetState(@SW_SHOW) ;Begin check every 3 seconds for new output $begin = TimerInit() #Region Loop ;begin loop While 1 ;Sleep for lower CPU usage Sleep(100) ;Get GUI msg $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ;If msg is Close then Exit program Exit 0 Case $msg = $butt ;If the button is pressed sending(GUICtrlRead($input)) recv() Case $msg = $butt_reset Clearlist() Case Else ;Check the differentce $dif = TimerDiff($begin) if $dif > $waittime Then recv() ;begin reset $begin = TimerInit() EndIf EndSelect ;End Loop Wend #EndRegion End Loop #Region Functions Func SetConsole($Text) $Line = $Line + 1 GUICtrlSetData ($recvwin, $Text & @CRLF, $Line) EndFunc Func recv() _GUICtrlListClear ($recvwin) $recv = TCPRecv($socket, 100000) if $recv <> "" Then SetConsole($recv) EndIf EndFunc func sending($send_data) TCPSend($socket,$send_data & @CRLF) EndFunc func Clearlist() GUICtrlSetData($recvwin,"") EndFunc #EndRegion End Functions Comments,question everything is welcome Edited May 23, 2007 by xzaz Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
Obi-w00t Posted May 23, 2007 Share Posted May 23, 2007 I thought for a second someone else had posted a Teamspeak status client before I posted mine - that would have really cheesed me off! It's a nice concept - however it would be a good idea to enable the user to select commands in the GUI, and display the server output in a more user-friendly way. So that the user connects to the server and the click "Select Server", giving a list of possible server the user can connect to. From there they can then look at the user currently online and in what channels they are. I could give you the code I have for getting the player list, channel list, server name and parsing the data to give the server layout so you could integrate it all into a nice GUI (my version does it in text as I made it to be implemented as a web-based script). Link to comment Share on other sites More sharing options...
Gif Posted May 23, 2007 Share Posted May 23, 2007 good script keep on autoiting Link to comment Share on other sites More sharing options...
James Posted May 23, 2007 Share Posted May 23, 2007 It doesnt work for me. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
xzaz Posted May 23, 2007 Author Share Posted May 23, 2007 Tnx for the response guys. I will make a new GUI with build-in server commands. @Secure_ICT First you need to login with your Super admin account: slogin name password Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
rambo3889 Posted May 23, 2007 Share Posted May 23, 2007 (edited) Looks good, havent tested it since i dont use TS. but: while 1 Sleep(100) $msg=guigetmsg() ;.. ;.. should after what i know just be: while 1 $msg=guigetmsg() ;.. ;... Since the GUIgetmsg idles the CPU. Edit:Typo Edited May 23, 2007 by rambo3889 My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
xzaz Posted May 23, 2007 Author Share Posted May 23, 2007 Looks good, havent tested it since i dont use TS. but: while 1 Sleep(100) $msg=guigetmsg() ;.. ;.. should after what i know just be: while 1 $msg=guigetmsg() ;.. ;... Since the GUIgetmsg idles the CPU. Edit:TypoTnx that solved my "lag" problem Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
James Posted May 25, 2007 Share Posted May 25, 2007 I am, the only Administrator on this computer. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gif Posted May 25, 2007 Share Posted May 25, 2007 I am, the only Administrator on this computer.maybe you are not in the administrator's grouptype > contro userpasswords2 in the run com. line and check if your current user is listed in the Administrator's groupif not make him and then check the program Link to comment Share on other sites More sharing options...
James Posted May 25, 2007 Share Posted May 25, 2007 Yes and it says: James: Debugger Users;Administrators Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gif Posted May 25, 2007 Share Posted May 25, 2007 Yes and it says:James: Debugger Users;Administratorshm u r in the administrators but i think you should remove the debugger usersnot sure Link to comment Share on other sites More sharing options...
James Posted May 25, 2007 Share Posted May 25, 2007 I have done. I tried everything. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted May 25, 2007 Share Posted May 25, 2007 It's been awhile (since college) since I've messed with TeamSpeak, but this is impressive. @Secure_ICT: I think he means you have to login to the TeamSpeak server with your super admin account on there (I do remember their being a super admin on it). Again, it's been awhile for me, so I may be wrong, but it makes sense that, to control TeamSpeak, you'd have to be logged in as an admin, let alone the Super Admin. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now