SRL Archive - OSR Help

Variable in text (read)


marc2333

2012-06-02 22:31:42

Ok, so i would like get my variable typed when i use typesend('hello, this is the x time i rune this script')

so, i would have that :

var
x = 1

procedure numberoftime;
typesend('hello, this is the x time i rune this script')
wait(5000)
x+1
end;

begin
repeat numberoftime; until(x=10);
end;

Whats the best way to do this ?

riwu

2012-06-02 22:36:28

program Xtimes;
{$i SRL/srl.simba}
var
x:integer;

procedure NumberOfTime;
begin
Typesend('hello, this is the '+ IntToStr(x+1)+ ' time i rune this script')
wait(5000);
end;

begin
repeat
NumberOfTime;
Inc(x);
until (x=10);
end.

One does not simply turn an integer into a string :sasmokin:

Edit: also if u just want to test this, u should probably use
WriteLn(writes in the debug) instead of Typesend (really types it out to whatever window u targeted)

Frement

2012-06-02 22:44:02

Example:
program new;
var I: Integer;
begin
I := 0;
repeat
Inc(I);
Writeln('I = ' + ToStr(I));
until(I = 10);
end.

marc2333

2012-06-02 22:44:40

Ok thanks alot, i think this will work, what is the {$i SRL/srl.simba} needed for ?

riwu

2012-06-02 22:51:03

From: marc2333
Ok thanks alot, i think this will work, what is the {$i SRL/srl.simba} needed for ?

If u are using srl functions–which u should be (TypeSend is one of them), u will need to include it. I suggest u read
http://villavu.com/forum/forumdisplay.php?f=95
for the basics first.

marc2333

2012-06-02 23:13:23

Thanks alot to Frement and riwu, i combined 2 things you gave me and i got my shit to work !! thx alot