Fitta
2014-09-06 12:15:37
Quick test script..
You could have as many options as you'd like.. Creative people will understand the possibilities.
Just a few things
Edit: Forgot.. Input "test?5!" or any other number for that matter..
You could have as many options as you'd like.. Creative people will understand the possibilities.
Just a few things
- NextPlayer(True);
- Respond without pausing the script
- change any variable
- breaks when told
program TestIdea;
{$I SRL-OSR/SRL.Simba}
const
input_FKey = 5;
var
Test: Integer;
function Left(str: string; x: Integer): string;
var
l: Integer;
begin
l := Length(str);
if ((x > 0) and (l > 0)) then
Result := Copy(str, 1, x);
end;
Procedure HandleCheck(S: String);
var
commandS, ExecuteS: String;
begin
CommandS := Left(S, PosEx('?', S, 1));
Case CommandS of
'test?': Test := StrToIntDef(Between('?', '!', S), -1);
end;
end;
Procedure input_Check;
var
S: String;
begin
If not IsFKeyDown(input_FKey) then
Exit;
InputQuery('Enter input', 'Input valid string: ', S);
HandleCheck(S);
end;
begin
repeat
Writeln(Test);
input_Check;
Wait(100);
Cleardebug;
until(False);
end.
Edit: Forgot.. Input "test?5!" or any other number for that matter..