Technical Support Contact Us   

PC Access for Windows Reference Guide

for PC Access for Windows 4.30.158


Script Command: sendtoday

Format:

sendtoday {format "date format"} {offset n};

This command sends the current date to the host. You may specify the format of the date text with "date format". You may send a date other than the current date by using offset n, where n is in the units of days and may be a positive or negative signed integer.

The "date format" defaults to MM/DD/YY. The PC Access script command processor will scan your "date format" and substitute numerical date components as follows:

· MM (month); example: 02

· DD (day of month); example: 28

· YY (two-digit year); example: 99

· YYYY (four-digit year); example: 1999

· MFM has tested this command and found it to work with year values of 2000 and above.

The script command processor will send all other characters in "date format" to the host exactly as you type them. Normally these other characters will be delimiters between numerical date components.

Examples:

// Send the word "Hello" to the host:
sendtoday format "MM-DD-YYYY";
sendtoday format "YY-MM-DD";
sendtoday format "Today is the MM month, DD day of the year YYYY";
sendtoday format "MM-DD-YY" offset 2;    // Two days from now
sendtoday format offset -7;              // One week ago

The sendtoday command may be useful in an auto-login script you execute via delayed dialing. This enables your script to supply the current date each time it runs to any command on the host that expects a date.

You may conveniently insert a sendtoday command while you are recording a script by selecting the Script | Send a Date... menu item on the Terminal window. This opens the Send a Date Relative to Today window where you may edit the sendtoday command parameters.

This topic is new for PC Access 4.30.

Back to script command list.


Home Contents Previous Next

[Contents (Javascript menu format)] [Contents (HTML format)] [Search] [Glossary]


Tell me more about this site.
Can't find what you need? See: How to Find It.
Contact us
Report a problem with this page or suggest an improvement for this page.

Last modification date: Friday, January 17, 2003 00:58:55

 

Copyright © 2005 - MFM Software, Inc.
11988 Tramway Drive
Cincinnati, OH 45241
Phone: 513.733.9229
Fax: 513.733.8775
Send comments to webmaster@mfm.com