|Everything HP200LX: Knowledge, Products, Service|
Automating time adjustment
Jose M. Lafora suggested a way to automatically adjust the 100LX's internal clock by starting a batch file that issues a DOS `time' command from ApptBook (see Nov/Dec 93, page 54). This works fine as long as your Palmtop is losing time. However, if the internal clock is running too fast, there is a problem: Unless you leave the letter q out of the Location field in ApptBook and press (ESC) after each time adjustment, Jose's procedure will create an endless loop.
Correct the problem as follows. Jose created a four-line batch file called ADJU-TIME.BAT . The example I use here assumes that the clock is running 10 seconds fast. I added the line WAIT30.COM before TIME and modified the TIME command to delete 10 seconds from the system clock.
The new batch file looks like this:
This additional command calls the program WAIT30 .COM described below, which pauses the execution of the batch file for 30 seconds and then returns to the batch file to execute the remaining commands.
For example, we set the macro to run as an appointment at 3:00:00. It immediately calls WAIT30.COM, which pauses the batch file until the internal clock at 3:00:30 am. The batch file continues execution, issuing a time 3.00.20.50 command, knocking 10 seconds off the time. The .50 at the end of the TIME command compensates for the 1/2 second it takes to reset the time.
[Editor's Note: Before you attempt to use any programs created with DEBUG, back up your C:\ and A:\ disk to protect your data!]
Create the following file in MEMO and save it in ASCII format with the name WAIT.SCR.
Make sure you include the empty line after int 21. Then go to the DOS prompt and type debug < wait.scr. This will create the program WAIT30.COM, which waits until the internal clock reaches the value of 30.
Hope this information is of value to someone.
CompuServe ID: [73064,1657]
Copyright © 2010 Thaddeus Computing Inc