Predefined Script Libraries

adTempus includes two predefined script libraries.

The "Builtin" Library

The "Builtin" library contains two functions that may be of use to your scripts.

PadNumber(number,digits) as String

The PadNumber function is provided to make up for the lack of flexibility in the VBScript Format function. PadNumber simply pads (prefixes) a number with zeroes to make it the desired length. For example, if you want to format the current month so that it always has two digits (e.g., 03 or 10), you can use PadNumber:

PadNumber(Month(Now),2)

SendKeysToTargetApplication(keys) as Boolean

The SendKeysToTargetApplication function can be used to send keystrokes to the target application within a Program Execution task. See the Sending keystrokes to an application topic for more information.

The function activates the appropriate window and then sends keystrokes using the SendKeys method of the WshShell object. See the SendKeys Syntax topic for information on how to format the keystroke string.

SendKeysToWindow(windowTitle,keystrokes) as Boolean

The SendKeysToWindow function can be used to send keystrokes to the window with the specified title. The function activates the window with the windowTitle you specify and then sends keystrokes using the SendKeys method of the WshShell object. See the SendKeys Syntax topic for information on how to format the keystroke string.

If the specified window is found and activated, and the keystrokes successfully sent, the function returns True. Otherwise it return False.

The "ADSConversion" Library

The "ADSConversion" library contains helper functions that are only used if you have imported jobs from the Arcana Scheduler that used the command-line macro capabilities of the Arcana Scheduler.