From 3c395ca377868e75dab1f6b875d38a8c842072aa Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 18 Dec 2015 09:15:47 +0100 Subject: Ton wird jetzt höchstens ein Mal alle 20 Sekunden gegeben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emails.lps | 78 +++++++++++++++++++++++++++++--------------------------------- unit1.lfm | 12 +++++----- unit1.pas | 9 +++++--- 3 files changed, 48 insertions(+), 51 deletions(-) diff --git a/emails.lps b/emails.lps index 1178067..ce5a2a2 100644 --- a/emails.lps +++ b/emails.lps @@ -19,7 +19,8 @@ - + + @@ -28,8 +29,8 @@ - - + + @@ -49,8 +50,8 @@ - - + + @@ -66,125 +67,118 @@ - + - + - + - + - + + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + + - + - - + + - + - - + + - + - + - + - - - - - - - - diff --git a/unit1.lfm b/unit1.lfm index 4677922..b874def 100644 --- a/unit1.lfm +++ b/unit1.lfm @@ -1,7 +1,7 @@ object Form1: TForm1 - Left = 137 + Left = 0 Height = 756 - Top = 158 + Top = 274 Width = 999 Caption = 'Form1' ClientHeight = 756 @@ -72,18 +72,18 @@ object Form1: TForm1 end object CheckBox1: TCheckBox Left = 272 - Height = 24 + Height = 21 Top = 596 - Width = 98 + Width = 93 Caption = 'aufploppen' OnClick = CheckBox1Click TabOrder = 2 end object CheckBox2: TCheckBox Left = 416 - Height = 24 + Height = 21 Top = 596 - Width = 94 + Width = 86 Caption = 'Ton geben' Checked = True OnClick = CheckBox1Click diff --git a/unit1.pas b/unit1.pas index 3f1e334..a43430e 100644 --- a/unit1.pas +++ b/unit1.pas @@ -83,7 +83,7 @@ begin pc:=tPopClient.create; pc.timeout:=10; pc.neueNachrichten:=@neueNachrichten; - pc.sshUser:='erich'; +// pc.sshUser:='erich'; pc.host:='eckner.net'; pc.user:='notify@eckner.net'; pc.pass:='C7sd7k8*'; @@ -145,7 +145,9 @@ begin memo1.height:=button1.top-memo1.top; end; -const __erstesMal: boolean = true; +const + __erstesMal: boolean = true; + __letzterTon: extended = 0; procedure TForm1.FormShow(Sender: TObject); begin @@ -211,7 +213,8 @@ begin trayIcon1.hint:=trayIcon1.hint+', davon '+inttostr(mitMarkeDa)+' mit Marke'; if checkBox1.checked then form1.visible:=true; - if checkBox2.checked then begin + if checkBox2.checked and ((now-__letzterTon > 1/24/60/3) or (now<__letzterTon)) then begin + __letzterTon:=now; setlength(argumente,1); argumente[0]:=extractFilePath(application.exename)+'gotmail.wav'; ausgabe:=''; -- cgit v1.2.3-54-g00ecf