AuthorMessage
b_w_johan
Regular
Posts: 56

hey all,
i need/want to find a quicker way for this:
i recieve data from hub
$HubINFO [NL]Kingdoms Movieworld$scripters-elite.no-ip.info:666$Kingdoms Network - dvd dutch subs dvd dutch spoken dvd nl DVD ONLY.px.$100$3221225472$1$5$PtokaX$kingdoms_network@hotmail.com|
to be precisly
and what i do now:
split on space
so i can drop the $Hubinfo
then splitt on $
so i get all kind of small pieces and add this to a list1
then i read all data from list1 and paste them in text1.text seperated with "|"
but i think there must be a faster way ... and if there isn't a faster way i have a request for meka.dll can it have some wordreplacer function ????
so i only have to splitt on space
and wordreplace all the $ in string to |
b_w_johan
Meka][Meka
Unstopable
Posts: 700

can u show me how u want the list to look in final?
b_w_johan
Regular
Posts: 56

ok well its to replace my lua hublist server...
so i need it to save like
hubname|hubaddy|discription|usercount|sharesize| well and then ||| or in between the extra data
Meka][Meka
Unstopable
Posts: 700

split from "|" first, then with your split data do a loop and split by " " and check as commands... and add to correct location in what i call in vb a modifier, ie a slow array
str(0)
str(1)
etc or jus append to a standard string... but appending is slow and time consuming, so best to put it all together at once imo, u can then use doevents before you put the string together...
then put your modifier together using upperbound loop, and voila u have your string
b_w_johan
Regular
Posts: 56

hmmz now i have the
lock
key hubinfo
^^
standart for getting it saved to file
what i have now is
connecting to hub
send the $botinfo
recieve
$hubINFO
and that is string like posted above
i split that string on space
then i split seccond part and each part is stored in a list1 thingy
then i read list1. well item1.text & "|" & list1.item2
but thats to complicated i now have like a place to put the list1 and the textbox wich i use to store the complete string converted to split in |
can't there be made some funtion in youre dll
to search in a string for certain word(s) or symbol(s) so i have a piece of code like:
ElseIf (Left(sData, 9) = "$HubINFO ") Then
well something like
Search(sData,"$")
replace(sData,"|")
end if
lol i know this is not good code but you know better what i meen i think ....
Meka][Meka
Unstopable
Posts: 700

ye use the before first method, i will add new function when i get time tho ;)