Autor Beitrag
Sauger Chris
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: Sa 05.06.04 21:25 
Hallo
kann man das machen das ein programm (Test.exe)
Bsp. um 12.00 Uhr startet.

Gruß

Sauger CHris (Delphi7)


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am So 06.06.2004 um 13:38
robin86
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 26



BeitragVerfasst: Sa 05.06.04 21:49 
Bin mir auch nich sicher, ob das vielleicht über die registry geht??

Einfacher wär es aber ein kleines Programm im hintergrund laufenzulassen, welches test.exe dann um 12.00 anstößt.

Ich glaub nicht, dass es möglich ist das Programm ohne Zugriff von außen zu starten.
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 05.06.04 21:51 
Jo also unter Windows Millenium (und unter 98 afaik auch) gabs ein Programm das geplante Tasks hieß. Da konnte man genau sowas einstellen. Musst mal ein bisschen danach suchen, vllt. gibts es unter xp auch noch.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: So 06.06.04 10:18 
gibts unter allen Windows BS schau mal in die Systemsteuerung: Stichwort: geplante Tasks.
grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 06.06.04 10:39 
das haben aber nicht alle leute aktiviert. das heisst wenn du auf nummer sicher gehen willst, dann musst du es mit einer exe amchen, die im hintergrund läuft.
wenn dus nur für dich ahben willst dann mach es über die geplanten tasks.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 06.06.04 10:50 
oder ganz einfach die exe einfach beim systemstart laden und um 12:00 die gewünschte funktion ausführen lassen...

raziel

_________________
JSXGraph
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 06.06.04 10:53 
Das sagte matze schon:
matze hat folgendes geschrieben:
das heisst wenn du auf nummer sicher gehen willst, dann musst du es mit einer exe amchen, die im hintergrund läuft.
Sauger Chris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: So 06.06.04 16:22 
Titel: 12.00 UHR starten
hallo
wie kann ich so eine Programm machen
(Das mit windows start starten das weiß ich wie das geht (Reg.))
und wie mache ich das mit der zeit

Gruß

Sauger Chris(Delphi7)
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: So 06.06.04 16:27 
Überprüfe einfach die Systemzeit...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure uhrzeit;
var zeit : String;
begin
  zeit := timetostr(time);
  if zeit = '12:00' then          //hier musste noch ein bisschen testen, weiss nicht in welchem format die angezeit wird
    begin
      ShellExecute(0
               Nil
               PChar('C:\deinprogramm.exe'), 
               Pchar(''), 
               Pchar(''),
               SW_NORMAL);
      application.terminate; 
   end;
  end;
end.
Sauger Chris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: So 06.06.04 16:37 
Jo Danke für den code ich werde es aus probieren

Gruß

Sauger Chris(Delphi7)
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 07.06.04 15:44 
Karlson hat folgendes geschrieben:
Überprüfe einfach die Systemzeit...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure uhrzeit;
var zeit : String;
begin
  zeit := timetostr(time);
  if zeit = strtotime('12:00'then          //mit strtotime gehts ;-)
    begin
      ShellExecute(0
               Nil
               PChar('C:\deinprogramm.exe'), 
               Pchar(''), 
               Pchar(''),
               SW_NORMAL);
      application.terminate; 
   end;
  end;
end.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 07.06.04 16:11 
onlinehome hat folgendes geschrieben:
Karlson hat folgendes geschrieben:
Überprüfe einfach die Systemzeit...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure uhrzeit;
var zeit : String;
begin
  zeit := timetostr(time);
  if zeit = strtotime('12:00'then          //mit strtotime gehts bestimmt nicht ;-)
    begin
      {...}
    end;
  end;
end.


Delphi-Compiler hat folgendes geschrieben:
[Fehler] Unit1.pas(29): Inkompatible Typen: 'String' und 'TDateTime'

Was zu erwarten war... ;-)
Du kannst doch keinen String ("zeit") mit TDateTime vergleichen ("strtotime(zeit)")!

raziel

_________________
JSXGraph
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 07.06.04 16:42 
sorry, schreibfehler, hab das ohne zu testen direkt hierrein geschrieben.
Sauger Chris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: Mo 07.06.04 21:53 
He danke für den code karlson
aber du hast bei deinem code die sec. vergessen
sonst geht es nicht.
Aber nicht schlimm ((Danke)Code)

Gruß

Sauger Chris(Delphi7)
max0704
Hält's aus hier
Beiträge: 13

Win Xp
D6
BeitragVerfasst: Do 17.06.04 14:59 
könntest du eventuell jetzt mal den vollständigen code posten, mcih würde das sehr interessieren...
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Fr 18.06.04 14:06 
raziel hat folgendes geschrieben:
onlinehome hat folgendes geschrieben:
Karlson hat folgendes geschrieben:
Überprüfe einfach die Systemzeit...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure uhrzeit;
var zeit : String;
begin
  zeit := timetostr(time);
  if zeit = strtotime('12:00'then          //mit strtotime gehts bestimmt nicht ;-)
    begin
      {...}
    end;
  end;
end.


Delphi-Compiler hat folgendes geschrieben:
[Fehler] Unit1.pas(29): Inkompatible Typen: 'String' und 'TDateTime'

Was zu erwarten war... ;-)
Du kannst doch keinen String ("zeit") mit TDateTime vergleichen ("strtotime(zeit)")!

raziel


Hupps, ich glaub da war ich ein bisschen abwesend. Sorry :autsch:
max0704
Hält's aus hier
Beiträge: 13

Win Xp
D6
BeitragVerfasst: Fr 18.06.04 14:13 
Zitat:
[Error] Unit1.pas(37): Incompatible types: 'String' and 'TDateTime'


das ist immer noch das problem :/
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 18.06.04 15:51 
Denk doch am besten mal ein bisschen nach ;)

wir wandeln die Systemzeit in einen String um
in einer IF schleife können wir natürlich nur zwei gleiche typen vergleichen, also String und String. (da wir die Zeit in einen String umgewandelt haben)

Es muss also einfach heissen:

ausblenden Delphi-Quelltext
1:
if zeit = '12.00' then					
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Fr 18.06.04 16:26 
Karlson hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
if zeit = '12.00' then					

Auch nich ganz ;-)
Imho fließen in TimeToStr die Lokalen Einstellungen mit ein. Benutz lieber FormatDateTime!

raziel

_________________
JSXGraph
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 18.06.04 17:04 
Nein, es funktioniert, habs extra nochmal ausprobiert ;) Muss allerdings 12:00:00 heissen.