Pure1993
2009-01-18 17:38:12
Hi,
Well, first of all I would like to apologize for all the help threads… But, with a bit of luck this is the last one for a very long time… :)
Anyway, I'll just post a script of what I want it to do (obviously, it doesn't work, but it cuts a long explanation short ^^):
So yeah, to clarify it further: I need it to click something, then do some stuff, then wait until another object/button/shape is clicked…
Thanks a lot in advance :D
Well, first of all I would like to apologize for all the help threads… But, with a bit of luck this is the last one for a very long time… :)
Anyway, I'll just post a script of what I want it to do (obviously, it doesn't work, but it cuts a long explanation short ^^):
program New;
{include srl/srl.scar}
var
frmDesign : TForm;
Shape1, Shape2 : TShape;
procedure Tryme(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
writeln('1');
repeat
Wait(100);
until Shape2.OnMouseDown; // Need some sort of Boolean here...
Writeln('2');
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 696;
frmDesign.Height := 480;
frmDesign.Hint := 'block';
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 := True;
frmDesign.PixelsPerInch := 96;
Shape1 := TShape.Create(frmDesign);
Shape1.Parent := frmDesign;
Shape1.Left := 304;
Shape1.Top := 64;
Shape1.Width := 33;
Shape1.Height := 33;
Shape1.Hint := 'block';
Shape1.Brush.Color := clBlack;
Shape1.Shape := stCircle;
Shape1.OnMouseUp := @Tryem;
Shape2 := TShape.Create(frmDesign);
Shape2.Parent := frmDesign;
Shape2.Left := 304;
Shape2.Top := 100;
Shape2.Width := 33;
Shape2.Height := 33;
Shape2.Hint := 'block';
Shape2.Brush.Color := clBlack;
Shape2.Shape := stCircle;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SafeInitForm;
SafeShowFormModal;
end.
So yeah, to clarify it further: I need it to click something, then do some stuff, then wait until another object/button/shape is clicked…
Thanks a lot in advance :D