HT BaaFly
2011-11-19 05:10:55
Working on my first script but couldn't get past this obstacle:
I'm trying to remove a peice of text from a string. e.g.:
I've got the string "1 2 g p" and I'm trying to remove all the text from it and end up with the numbers so I can convert it to an integer and use it for something else. I'm trying to figure out how to remove the " g p" part. Is there an already made function in SRL to do this? if not, can someone give me some hints of how to achive it
thanks a lot
edit:
this is the code for retrieving the text, if anybody is interested
I'm trying to remove a peice of text from a string. e.g.:
I've got the string "1 2 g p" and I'm trying to remove all the text from it and end up with the numbers so I can convert it to an integer and use it for something else. I'm trying to figure out how to remove the " g p" part. Is there an already made function in SRL to do this? if not, can someone give me some hints of how to achive it
thanks a lot
edit:
program new;
var
text: string;
int: integer;
begin
text := GetTextAtEx(296, 186, 440, 199, 0, 0, 0, 6400255, 5, 'UpChars');
int := StrToInt(text)
Writeln(int);
end. this is the code for retrieving the text, if anybody is interested