Yeah, I would do something smaller than what ur trying right now if you don't know about either of these:
Copy(Text: string; Beg, End: byte): string; -- it gets part of text that starts at the Beg, and ending at End, and getting everything between those two (including those two)
GetPiece(Text, Space: string; In: byte): string; -- (the
http://www.enesce.com/help/html/Functions/GetPiece.html is down.. but it might b up by the time u read this) -- Inside Text, it separates it into an array by splitting between each Space, and then resulting the In'th in the array.. if that makes sense.. horrible wording
)
Examples:
Copy('blarg',2,4): 'lar';
GetPiece('this is test',' ',0): 'this';
GetPiece('this is test',' ',1): 'is';
GetPiece('this is test',' ',2): 'test';