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:
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
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