Glyph Posted October 16, 2007 Share Posted October 16, 2007 (edited) heres what i got and doesnt work: expandcollapse popupDim $connectedip[1] $connectedip[0]="" dim $i=0 dim $y=0 dim $c=0 ; user connected case $data= StringRegExp($data, $connect,0) = 0 $msg=StringTrimLeft($data, 10) $msg2=StringSplit($data,"|") if $data <> "" Then _ArrayAdd($connectedip[$y],$msg2[2]) $c=$c+1 EndIf do $y=$y+1 UDPSend(UDPOpen($connectedip[$y], 2008),$connectout&"|"&$msg2[3]) sleep(10) GUICtrlSetData($chatbox,@HOUR&":"&@MIN&":"&@sec&" - [out] "&$connectedip[$y]&" "&$connectout&"|"&$msg2[3]&@CRLF&GUICtrlRead($chatbox)) until $y=$c $y=$y-$c GUICtrlSetData($chatbox,@HOUR&":"&@MIN&":"&@sec&" [Event] User Connect: "&$msg2[3]&@CRLF&GUICtrlRead($chatbox)) UDPSend(UDPOpen($connectedip[$y], 2008),".connected.|"&$msg2[3]) _ArrayAdd( $avArray, GUICtrlCreateTreeViewitem($msg2[3], $userbox)) $i=$i+1 ; got a messege case $data= StringRegExp($data, $messagein,0) = 0 $msg2=StringSplit($data,"|") if $data <> "" Then $c=$c+1 EndIf GUICtrlSetData($chatbox,@HOUR&":"&@MIN&":"&@sec&" - [in] "&$msg2[2]&@CRLF&GUICtrlRead($chatbox)) do $y=$y+1 UDPSend(UDPOpen($connectedip[$y], 2008),".messaged.|"&$msg2[2]) GUICtrlSetData($chatbox,@HOUR&":"&@MIN&":"&@sec&" - [out] "&$msg2[2]&@CRLF&GUICtrlRead($chatbox)) until $y=$c $y=$y-$c Edited October 16, 2007 by BackStabbed tolle indicium Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 16, 2007 Share Posted October 16, 2007 heres what i got and doesnt work:...which is OK if it's not meant to do anything. All seriousness aside, define "doesn't work". What was it supposed to do, and what's it doing instead? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted October 16, 2007 Share Posted October 16, 2007 Your case statements don't appear valid: case $data= StringRegExp($data, $connect,0) = 0 case $data= StringRegExp($data, $messagein,0) = 0 Compare one side or the other. Link to comment Share on other sites More sharing options...
Glyph Posted October 16, 2007 Author Share Posted October 16, 2007 lol. i should have added. sorry. but heres what isn't working: $connectedip[$y] it returns -1 -.- tolle indicium Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 16, 2007 Share Posted October 16, 2007 lol. i should have added. sorry. but heres what isn't working: $connectedip[$y] it returns -1 -.- Look at the help file for _ArrayAdd(). The first parameter is the array to add another element to, and therefore cannot have a subscript. So, for example, _ArrayAdd($connectedip[$y],$msg2[2]) should be _ArrayAdd($connectedip,$msg2[2]). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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