SRL Archive - Help and Support

Opening an script in scar.


BobboHobbo

2008-02-19 05:01:21

Im making a super script :o but i have something that is like File > load and like you load the script but how do make it load it ;P i was looking at rons form thingo and found:

procedure Browse(Sender: TObject);
var
OpenDialog1: TOpenDialog;
DFM: TStringList;
begin
OpenDialog1 := TOpenDialog.Create(frmDesign);
with OpenDialog1 do
begin
DFM := TStringList.Create; // create tstring
InitialDir := LoadSetting(SettingsFolder, 'OpenDialogFolder');
if (InitialDir = '') then // If the InitialDir is empty, set it to the AppPath
InitialDir := AppPath;
Options := [ofFileMustExist]; // the file must exist and open it read-only
Filter := 'SCAR file (*.SCAR)|*.SCAR|All files|*.*';
if (Execute) then
begin
MainAreaM.Text := Filename;
SaveSetting(SettingsFolder, 'OpenDialogFolder', ExtractFilePath(FileName));
end;
Free;
end;
end;

But it only gets the name of the file not the script -.- (I edited a bit) Yes, so get ready for a scar inside scar :o

Naike

2008-02-19 05:17:01

Ok now if i got this right :P,
This can open an scar within a scar?

Lets say i run a script, HobbosAlienFinder (^^) and when its done it opens another scar and runs another script?

Im a little confused like always *_*

BobboHobbo

2008-02-19 05:26:54

No, ive made a replicate of scar (In scar *with the form editor*)well almost ;) and it gonna have all these tools nd shit on it. And i need an Open button to open files..