SRL Archive - Help and Support

SRL Application Problem


BobboHobbo

2008-02-13 06:12:41

Ah yea, as you might know im making the Application rator. But the edit box wont let you go over one line.

Heres script Run.

Down for more info.
program New;

var
frmDesign : TForm;
LabelTop : TLabel;
Label1 : TLabel;
MarkingL : TLabel;
AnswerL : TLabel;
PercentL : TLabel;
ScriptAreaE : TEdit;
GenerateB : TButton;
EndMainForm:boolean;

// When the form is closed, this code will be executed.
procedure MainFormOnClose(Sender : TObject; var Action : TCloseAction);
begin
if (not(frmDesign.ModalResult = 1)) then
EndMainForm := True;
end;
var
Scripttext :string;
I :integer;
Procedure Generate;
begin
ScriptText := ScriptAreaE.Text;
If ScriptText = 'RadialRoad' then
begin
I := I + 1;
end;
If ScriptText = 'break' then
begin
I := I + 1;
end;
AnswerL.Caption := IntToStr(I);
end;
procedure HandleButtons(Sender: TObject);
begin
case Sender of

generateB: begin
Generate;
end;
end;
end;
// This form was parsed using: DFM Form Parser v.25 by Ron.
procedure MainForm;
var
TimeMainForm : Integer;
begin
TimeMainForm := GetSystemTime;
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 741;
frmDesign.Height := 480;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
LabelTop := TLabel.Create(frmDesign);
LabelTop.Parent := frmDesign;
LabelTop.Left := 32;
LabelTop.Top := 32;
LabelTop.Width := 543;
LabelTop.Height := 37;
LabelTop.Caption := 'SRL-Forums SRL Member Application';
LabelTop.Font.Color := clWindowText;
LabelTop.Font.Height := -33;
LabelTop.Font.Name := 'MS Sans Serif';
LabelTop.Font.Style := [];
LabelTop.ParentFont := False;
MarkingL := TLabel.Create(frmDesign);
MarkingL.Parent := frmDesign;
MarkingL.Left := 424;
MarkingL.Top := 424;
MarkingL.Width := 73;
MarkingL.Height := 13;
MarkingL.Caption := 'Score:';
AnswerL := TLabel.Create(frmDesign);
AnswerL.Parent := frmDesign;
AnswerL.Left := 505;
AnswerL.Top := 424;
AnswerL.Width := 16;
AnswerL.Height := 13;
AnswerL.Caption := '0';
PercentL := TLabel.Create(frmDesign);
PercentL.Parent := frmDesign;
PercentL.Left := 520;
PercentL.Top := 424;
PercentL.Width := 8;
PercentL.Height := 13;
PercentL.Caption := '%';

ScriptAreaE := TEdit.Create(frmDesign);
ScriptAreaE.Parent := frmDesign;
ScriptAreaE.Left := 40;
ScriptAreaE.Top := 128;
ScriptAreaE.Width := 641;
ScriptAreaE.Height := 289;
ScriptAreaE.AutoSize := False;
ScriptAreaE.AutoSelect := False;
ScriptAreaE.TabOrder := 8;
ScriptAreaE.Text := 'Script Here.';
GenerateB := TButton.Create(frmDesign);
GenerateB.Parent := frmDesign;
GenerateB.Left := 536;
GenerateB.Top := 80;
GenerateB.Width := 145;
GenerateB.Height := 41;
GenerateB.Caption := 'Generate Mark';
GenerateB.TabOrder := 9;
generateB.OnClick :=@HandleButtons;
WriteLn('MainForm compiled in ' + IntToStr(GetSystemTime - TimeMainForm) + ' milliseconds!');
end;

procedure SafeMainForm;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('MainForm', V);
end;

procedure ShowMainFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowMainFormModal;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowMainFormModal', V);
end;

procedure MainMainForm;
begin
try
SafeMainForm;
SafeShowMainFormModal;
finally
FreeForm(frmDesign);
except
WriteLn('An error seems to have occurred in: MainForm');
end;
end;

begin
ClearDebug;
GetSelf.WindowState := wsMinimized;
MainMainForm;
GetSelf.WindowState := wsNormal;
if (EndMainForm) then
TerminateScript;
end.
DW about standards, cbf adding atm.

Like run and try adding

Omg
omg
omg

to the edit box, it will not go past one line? Why?

nielsie95

2008-02-13 06:18:09

Use a TMemo?

BobboHobbo

2008-02-13 06:22:33

But in umm the form parser has an edit box and it works, but idk how come?

Tmemo :l has those stupid Tmemo.Add('…'); really cbf making it use stuff thats not simple for me to make fast :)

nielsie95

2008-02-13 06:37:46

I don't exactly know what you mean.
Ron's form parser uses a TMemo..

BobboHobbo

2008-02-13 06:40:33

From: nielsie95
I don't exactly know what you mean.
Ron's form parser uses a TMemo..

Oh looked more closly, dw im a fuckwit, ty NIELSE