User Submitted Macro

Current Date

Written by John M. Stethers, ICE Systems, Inc., http://www.icesys.com

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

If Notepad is already running, checks for the existence of an “Untitled – Notepad” window. If none is found, a new Notepad process is started with a blank document window. Otherwise it will activate the window with the title “Untitled – Notepad”. Once the window is launched or found, it is focused (activated), positioned to the center of the primary screen, and resized.

Requirements

Created on Version 3.0c build 1 (3.0.3.1). Untested with prior versions.