Hi Riamus2
Kelder's suggestion of using binary variables and writing the data to a text file got me thinking.
after some experimentation i discovered that when you do a sockread to a binary varible
the &bvar is filled with the raw source complete with no stripping of any chars.
the stripping was a result of echo'ing/printing the data.
after reading through the mirc help file on binary variables i found i could scan the &bvar with the source data and extract just the parts i wanted into normal %vars using $bvar
from there parsing the extracted data is a simple matter.
to handle the gaps in the data between sockread events all i had to do is to save the right 200 chars of the source data...
if $calc(%size - %pos) <= 200 {
breplace &buffer 32 183
set %buffer $bvar(&buffer,%pos,200).text
return
}
then append the next sockread to the saved data...
if %buffer != $null {
sockread &buffer2
bset -t &buffer 1 %buffer
breplace &buffer 183 32
set %pos $calc($len(%buffer) + 1)
var %size = $calc(%pos - 1 + $sockbr)
bcopy &buffer %pos &buffer2 1 -1
unset %buffer
}
and then contintiue extracting the wanted data where i left off in the last sockread event
this has resolved all the issues i was having using normal %vars
thank you for your help:)
p.s the breplace preserves the spaces from being stripped when assigned to a normal %var:)