John M. Stethers
What it does:
Captures the current date for reporting, logging, and saved file name
functions with various macros. Some macros calculate prior day, prior
month, prior month date range, while considering leap year.
To install:
Download the macro file umcurrdate.zip
and save it to your hard drive. Unzip the files and save them in the folder where you store
your macro file(s). Open the macro file CurrDate.mex. Open macro PriorMonthDateRange. Change
path to current location for Month.csv and LeapYear.txt. Save.
To use:
Import any of the macros from Time.mex in any macro. In the Macro Express Script Editor, insert
"Macro Run" command to Macro Nickname (e.g. "PriorMonthDateRange"). Use string variables
(e.g. T8 for Start Date, and T7 for End Date) where applicable. For help, select "Import Macros"
and/or "Run a Macro" in Macro Express Help Index.
Run the macro by pressing Win+Alt+B. A message is spoken and a dialog displayed if a banned program
is running. You may also want change this to a scheduled macro. If you do, you would want to either
mute the spoken messages or remove the 'done' message that is spoken when the macro ends.
How it works:
Uses Macro Express commands Variable Set Integer from Current Year, Month, and Day and logic to
set String Variables to date formats (e.g. YYYYMMDD = 20030417). Checks if Current Month and
Day are single digit and inserts a zero when applicable. Used to save filename as current date
for name sorting.
Requirements:
Created on Version 3.0c build 1 (3.0.3.1). Untested with prior versions.
Submitted by:
John M. Stethers
ICE Systems, Inc.
http://www.icesys.com
|