Skip to content

Commit

Permalink
Output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
artem78 committed Jun 30, 2020
1 parent c97393c commit 101425c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion uAutoScreen.pas
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,17 @@ procedure TMainForm.ReadSettings;
DefaultLanguage = lngEnglish;
DefaultColorDepth = cd24Bit;
var
DefaultOutputDir: String;
FmtStr: String;
LangCode: String;
Seconds: Integer;
begin
OutputDirEdit.Text := Ini.ReadString(DefaultConfigIniSection, 'OutputDir', ExtractFilePath(Application.ExeName));
DefaultOutputDir := IncludeTrailingPathDelimiter(JoinPath(ExtractFilePath(Application.ExeName), 'screenshots'));
OutputDirEdit.Text := Ini.ReadString(DefaultConfigIniSection, 'OutputDir', DefaultOutputDir);
// ToDo: Check that directory exists or can be created (with subdirs if needed)
if OutputDirEdit.Text = '' then
OutputDirEdit.Text := DefaultOutputDir;

FileNameTemplateComboBox.Text := Ini.ReadString(DefaultConfigIniSection, 'FileNameTemplate', DefaultFileNameTemplate);

Seconds := Round(Ini.ReadFloat(DefaultConfigIniSection, 'CaptureInterval', DefaultCaptureInterval) * SecsPerMin);
Expand Down

0 comments on commit 101425c

Please sign in to comment.