Login | |
|
 |
Delphi In RealBasic - 3/5/2006 11:03:39 AM
|
|
 |
|
| |
clyde
Posts: 3
Score: 0
Joined: 3/4/2006
Status: offline
|
I don't know if anyone can help? i am absolutely new at programming and my first project is a plugin for a p2p app. My problem is that when i use a string like this: ////Tcp socket in the subconnect()//// ServerSock.write chr(&h00)+chr(&hFF)+chr(&h46)+"CLYD"+chr(&h00)+"Remote Admin is Now Active"+chr(&h2E)+chr(&h00) ////DataAvailable()//// Dim strdata as string Dim AresTxt as string Dim NickName as string Dim DataType as string Dim OutPutNextData as Boolean Dim NextdataType as string Dim TempData as string strdata = ServerSock.ReadAll(encodings.utf8) strdata = RightB(strdata,LenB(strdata)-3) AresTxt = Right(strdata,Len(strdata)-Instr(1,strdata,chr(&h0))) NickName = Left(strdata,Instr(1,strdata,chr(&h0))-1) DataType = Mid(strdata,3,1) TempData = strdata Select Case dataType ////Normal Chatroom Messege//// Case chr(10) if len (strdata) = 0 then OutPutNextData=True NextdataType=datatype Else OutPutNextData=False AresTxt=Replace(strdata,chr(0),">") End if ////a /me MessageDialog//// Case chr(11) if len(strdata) = 0 then OutPutNextData=True NextdataType=datatype Else OutPutNextData=False AresTxt=Replace(strdata,chr(0),">") End if ////A PM Messege//// Case chr(25) if len (strdata) = 0 then OutPutNextData=True NextdataType=datatype else OutPutNextData=False AresTxt="PM BY:["+Replace(strdata,chr(0),"]") End if ////User Part/// Case chr(22) if len (strdata) = 0 then OutPutNextData=True NextdataType=datatype else OutPutNextData=False AresTxt="a user has parted" end if //// User Joined//// Case chr(20) if len (strdata) = 0 then OutPutNextData=True NextdataType=datatype else OutPutNextData=False AresTxt="a user has joined" end if End Select chatscreen.text=AresTxt + EndOfLine chatscreen.selstart=len(ChatScreen.text+">"+AresTxt+endofline) ////Connects fine but as a ghost socket????//// /////If I use this string as a sock connect///// ServerSock.write chr(lenB(chr(&hBB)+chr(&h75)+chr(&h2E)+chr(&hB3)+chr(&h37)+chr(&h5E)+chr(&hA0)+chr(&h40)+chr(&h9B)+chr(&hCE)+chr(&hDA)+chr(&h79)+chr(&hA9)+chr(&h40)+chr(&h10)+chr(&h4A)+chr(&h00)+chr(&h00)+chr(&h00)+chr(&h2E)+chr(&h55)+chr(&h89)+chr(&h84)+chr(&hE2)+chr(&hA9)+chr(&hFF)+chr(&hED)+"username.text"+chr(&h00)+chr(&h41)+chr(&h72)++chr(&h65)+chr(&h73)+chr(&h20)+chr(&h31)+chr(&h2E)+chr(&h38)=chr(&h2E)+chr(&h31)+chr(&h2E)+chr(&h32)+chr(&h39)+chr(&h34)+chr(&h35)+chr(&h00)+chr(&hCA)+chr(&h45)+chr(&hA1)+chr(&h11)+chr(&h2A)+chr(&h4E)+chr(&hB8)+chr(&h11)+chr(&h03)+chr(&h00)+chr(&h01)+chr(&h00)))+chr(&h00)+chr(&h02)+chr(&hBB)+chr(&h75)+chr(&h2E)+chr(&hB3)+chr(&h37)+chr(&h5E)+chr(&hA0)+chr(&h40)+chr(&h9B)+chr(&hCE)+chr(&hDA)+chr(&h79)+chr(&hA9)+chr(&h40)=chr(&h10)+chr(&h4A)+chr(&h00)+chr(&h00)+chr(&h00)+chr(&h2E)+chr(&h89)+chr(&h84)+chr(&hE2)=chr(&hA9)+chr(&hFF)+chr(&hED)+chr(&h00)+chr(&h00)+chr(&h00)+"username.text"+chr(&h00)+chr(&h41)+chr(&h72)+chr(&h65)=chr(&h73)+chr(&h20)+chr(&h31)+chr(&h2E)+chr(&h38)+chr(&h2E)+chr(&h31)+chr(&h2E)+chr(&h32)=chr(&h39)+chr(&h34)+chr(&h35)+chr(&h00)+chr(&hCA)+chr(&h41)+chr(&hA1)+chr(&h11)+chr(&h2A)=chr(&h4E)+chr(&hB8)+chr(&h11)+chr(&h03)+chr(&h00)+chr(&h01)+chr(&h00) //// entire string is wrong//// if someone could point me in the direction of figuring out why it will connects as a ghost???? i would like to have it appear to be an actual person in the room and send text to chatroom?
< Message edited by clyde -- 3/5/2006 11:22:29 AM >
|
|
| |
|
|
|
 |
RE: Delphi In RealBasic - 3/5/2006 11:29:39 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Dude, this isn't even in the realm of being VBScript. I guess rally it is since it is clearly a BASIC derived language just as VBScript, but Spanish and English are derived from the same laguages as well and I wouldn't be someone you would want to have ordering your food in Spain.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|