PDA

View Full Version : Drop All Button



Harry
04-14-2007, 01:56 AM
Hehe this was very simple to make. :D Just used DropAll; by SRL and added a little bit. I have always wanted for a drop all button on rs. So just hit CTRL ALT R and it has your inv get dropped =)

-Harry

Jason2gs
04-14-2007, 02:18 AM
Heh :p

Try making it into a form. A button that stays up, even if you click out of it, and if someone clicks the button, it'll drop everything.

Smartzkid
04-14-2007, 02:42 AM
...and make the form stay on top (frmdesign.style:=fstayontop or something of that manner)

Harry
04-14-2007, 09:07 PM
I am gonna have to learn how to do forums but that is a good idea.

-Harry

reece844
04-18-2007, 03:50 AM
Hey I made it for ya it was easy

program New;
{.include SRL\SRL.Scar}
var
frmDesign : TForm;
Button1 : TButton;
ProgressBar1 : TProgressBar;


procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 258;
frmDesign.Top := 114;
frmDesign.Width := 435;
frmDesign.Height := 274;
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;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 307;
Button1.Top := 171;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Drop';
Button1.TabOrder := 8;
ProgressBar1 := TProgressBar.Create(frmDesign);
ProgressBar1.Parent := frmDesign;
ProgressBar1.Left := 272;
ProgressBar1.Top := 213;
ProgressBar1.Width := 150;
ProgressBar1.Height := 17;
ProgressBar1.TabOrder := 9;
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure ButtonClick(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
DropAll;
end

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

procedure SetupScript;
begin
SetUpSRL;
SafeInitForm;
SafeShowFormModal;
end;


begin
SetupScript;
end.:sasmokin:

Rune Hacker
04-18-2007, 03:59 AM
reece844, you didnt add srl to it and didtn add setupsrl; :p

reece844
04-18-2007, 04:41 AM
oops ill fix that soz changing rigt now:duh:

Rune Hacker
04-18-2007, 05:01 AM
Line 30 should be false, line 61 needs semicolon, and you dont have an OnClick for your button. Is thsi your first time makign a form? lol

EDIT: i dotn want ot post it fixed because i want you to learn btw.