TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ARMEN AMBARTSUMIAN
from: STEVE BATSON
date: 1997-11-06 12:21:00
subject: Help Needed ,Ttimer

-> Could somebody help me with Timer properties and so on...i have some
-> problems! So, how can i check events with Timer component, i mean ,
-> for example we have a program that will run another program in 12:01
-> ?
-> Well,how can i make it ?
->
-> _Please_, help me, i have no ideas! :((
If I understand what you are trying to do (Start a program at a certain
time), it is easy.
1) setup a timer to check the clock, once a second, minute, hour,
etc...depending on the granularity that you need.
2) put the code you want executed in the OnTimer event.
For Example, if you want to execute a program at a particular hour and
minute, you could do the following:
- Set the timer interval property to 60000 (1 minute)
- use something like DateTimeToStr(Now) to check the current time
against your preset time variable in the timer's OnTimer event. If the
time is reached, you execute your code.
The timer is the easy part. You need write a little code to do the
comparison and make sure it works the way you want, but not bad.
Hope this helps.
Steve
--- HyperMail! v1.22
---------------
* Origin: Omni - (916) 388-0905, longest running Sac BBS (1:203/3333)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.