-
Notifications
You must be signed in to change notification settings - Fork 23
/
AutoScreenshot.lpr
44 lines (38 loc) · 1.05 KB
/
AutoScreenshot.lpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
program AutoScreenshot;
{$MODE objfpc}
//{$Define LAZLOGGER_FLUSH}
{$R *.res}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Forms,
LCLIntf, LCLType, LMessages, SysUtils,
Dialogs, Interfaces,
uMainForm in 'umainform.pas' {MainForm},
uAbout in 'uAbout.pas' {AboutForm},
uLocalization in 'uLocalization.pas',
uUtils in 'uUtils.pas',
uLanguages in 'uLanguages.pas',
UniqueInstanceRaw;
begin
// heaptrc settings
{$if declared(useHeapTrace)}
globalSkipIfNoLeaks := true;
{$endIf}
//setHeapTraceOutput('trace.log');
// Prevent to run second instance
if InstanceRunning('AutoScreenshot', True) then
begin
//Application.MessageBox('Another instance is running!', 'Error', MB_ICONERROR + MB_OK);
Application.Terminate;
Exit;
end;
Application.Scaled:=True;
Application.Initialize;
Application.HintHidePause := -1; // Do not hide hint
Application.Title := 'Auto Screenshot';
Application.CreateForm(TMainForm, MainForm);
Application.ShowMainForm := False;
Application.Run;
end.