• Log in or sign up for an account here: https://www.sythe.org/login

How to write an increasing varible after a constant in a text box?

s2h6699

Newcomer
Joined
Mar 7, 2010
Sythe Gold
0
Messages
12
How do I get a 'integer variable' after a constant? I tried

Code:
Program New;

Const
YourUsername='SCAR Scripting is fun';

Var
UserNameSuffix: integer;

procedure type;
begin
[B]SendKeys(YourUsername + IntToStr(UserNameSuffix));[/B]
UserNameSuffix:=UserNameSuffix+1;
end;

reapeat
signup;
until(UserNameSuffix=10)
end.

and

Code:
Program New;

Const
YourUsername='SCAR Scripting is fun';

Var
UserNameSuffix: integer;

procedure type;
begin
[B]SendKeys(YourUsername + 'UserNameSuffix';[/B]  
UserNameSuffix:=UserNameSuffix+1;
end;

reapeat
signup;
until(UserNameSuffix=10)
end.

Forgive Syntax's of stuff besides the bolded. The bolded is all I'm worried about. Also does the

Code:
UserNameSuffix:=UserNameSuffix+1;

correspond with the

Code:
until(UserNameSuffix=10)

correctly?

Gosh, even after an hour of this, it's still complicated. >.<
 
fist of all were do you get the signup procedure are you sure you didnt mean to put the type procedure and if so then this should straighten you out
Code:
Program New;

Var
UserNameSuffix: integer;

Const
YourUsername='SCAR Scripting is fun';

procedure typeit;
begin
SendKeys(YourUsername +inttostr(usernamesuffix));
inc(usernamesuffix);
end;

begin
repeat
typeit;
wait(10);
until(UserNameSuffix=10)
end.
Also i noticed you dont have enter when sending the key if you need it to enter here is also another version with enter in it

Code:
Program New;

Var
UserNameSuffix: integer;

Const
YourUsername='SCAR Scripting is fun';

procedure typeit;
begin
SendKeys(YourUsername +inttostr(usernamesuffix)+(chr(13)));
inc(usernamesuffix);
end;

begin
repeat
typeit;
wait(10);
until(UserNameSuffix=10)
end.
 
duelarena.gg
Back
Top