Getting Started

When Macro Scheduler is started it places its icon in the system tray next to the clock. To invoke the main Macro Scheduler window double click on this icon. Alternatively it is possible to right click on the icon and then select 'Settings' from the pop up menu.

This is the main control centre for Macro Scheduler. From here macros can be started, recorded, deleted and edited.

For further information see Creating Scripts and Recording Macros

Access to the functions is through the buttons or by selecting a macro and right clicking on it to display a pop up menu.


Creating Scripts

To create a new script click 'New' on the main Macro Scheduler window. To Edit an existing script, select it from the list by clicking on it and then press 'Edit'. Having done this you will be presented with the following window:

In this example an existing script was selected to be edited. If 'New' had been pressed then this form would appear blank.

There are two ways of building scripts from this window. One way is to use the drop down list of commands and the other is to use the built in editor. The latter method is recommended only for more experienced users and is great for maintaining long scripts. See Using The Editor for more information.

To build your script using the drop down list, simply select the desired script command, enter a value if one is required and then click 'Add' to add it to the end of the script. To insert a line, highlight the line you want to insert above and click 'Insert' after choosing the right command. You can delete a line from the script by selecting it and clicking on 'Delete'.

If you choose a command that requires a parameter value, enter one in the box marked 'Value'. If you forget Macro Scheduler will tell you what you need to enter.

If you need to edit a line quickly, highlight the line and click 'Edit Line'.  The value will then appear in the value box and the 'Edit Line' button will now say 'Update'.  After editing the value click on 'Update' and the script will be updated.

The button marked 'Open In Editor...' opens the script in the editor. The Import button allows you to load in a script that has already been created. This is useful if you have a number of Macro Scheduler installations and want to make use of a script created on a different PC for example.

Once you have created your script press 'OK' to save it and return to the main window. Press 'Cancel' to leave without saving the changes.


Using The Editor

While the method mentioned in Creating Scripts is very easy to use and avoids any errors occurring, it can become a bit laborious when creating very long and complicated scripts, especially if you need to perform cut and paste operations with large or repeated chunks of code. This is where the editor comes in.

To open your script in the editor simply edit the script in the usual way and then click on the 'Open In Editor...' button on the script settings window.

As a guide there is also a drop down command list on the panel which will write out your chosen command in the editor. This is useful for avoiding spelling mistakes and getting the case wrong. The usual editing functions are available from the speed buttons to cut, copy and paste. These operations can also be achieved using the standard windows shortcut keys (CTRL-X,CTRL-C,CTRL-V). The script can be printed by clicking on the printer button. If you're not sure what a button does just hover the mouse cursor over it to reveal the tool tip. When you have finished editing, close the editor by pressing on the door button or using the standard close button on the title bar. All changes made will now appear in the script box on the script settings window.


Scheduling Scripts

Once you have created your macro you will probably want to execute it. Macros can be run at any time from the main window, from Windows shortcuts, from the command line or to a specified schedule.

To set up a schedule, select the appropriate script and choose to edit it to invoke the macro settings screen. Then select the tab marked 'Run When' to display the following options.

Mark off the days on which you want the macro to run and enter a time. The time must be entered in 24 hour notation. If you want the macro to be repeated enter an appropriate value in the 'repeat every' box. If you don't want it repeated simply leave this set to zero.

To make the macro run on a monthly basis check the monthly box and enter the day of the month on which you want the macro invoked.

If you choose to run a macro on the 5th of the month and also check the Friday box, the macro will run every Friday AND on the 5th of the month regardless of what day the 5th is.

A Note About Screensavers

Screensavers usually stop successful detection of other windows. Consequently if a script that needs to setfocus or wait for windows to appear is run while a screensaver is active it may not work correctly.

To get round this Macro Scheduler temporarily disables screensaving just before it runs a script and re-enables screensaving when the script completes. It also attempts to determine if a screensaver is currently active and if so closes it down. However, there are many different implementations of screensavers which operate in different ways, making their detection and close down a rather unreliable process. To try to ensure that Macro Scheduler is successful in closing an active screensaver it briefly moves the mouse back and forth before running the script.

This should work in most cases. However, if you find that Macro Scheduler is unable to stop your screensaver, then the most reliable method of making sure that a scheduled macro runs properly is to simply disable screensaving altogether.


Logging

To set up a log file for a script select the tab marked 'Logging' on the macro settings window.

To enable logging check 'Log Progress of Macro'.

You can have Macro Scheduler purge the log file before each run by ticking the second box.

Enter a file name for the log file or select an existing one by using the browse button. If you like you can use one file for more than one macro.


Encryption

The majority of us probably won't ever have to use the encryption facility. However, if you need to use Macro Scheduler to automate a process which involves sending passwords to other applications or to send other sensitive information, then you would want to ensure that only the right people can edit the script and see the secrets.

Macro Scheduler allows you to set a password for a script which must then be used to edit it. The script file itself is scrambled so that if it is edited in any way it wouldn't make any sense.

Simply tick the box and provide a password.

The password must be entered twice to ensure it is entered correctly.

Next time you try to edit the macro you will be asked for the password.

To disable encryption on a macro that has been encrypted, edit it and then un check this box.


Recording Macros

To record a macro press the 'Record' button on the main window. You will be prompted for a name for the macro and recording will commence when Start is pressed.

By default CTRL-ALT-S will terminate the recording.  You can select an alternative key from the drop down list box if required.

New in version 4.2 is the ability to have the recorded macro translated into an ordinary script which can then be edited in the usual way.  It is possible to choose whether or not to translate the macro when recording is finished.  If you choose not to have it translated at this stage you can do it later by attempting to edit the macro.

Carry out the tasks you want to be captured and finally press CTRL-ALT-S (or chosen key) or click on 'Stop' to end the recording.

The new macro will appear in the macro list and can be executed by clicking the 'Run Now' button.

To schedule a recorded macro you need to create a new script and use the Macro> command to call the macro from the script. This script can then be scheduled in the usual way. See Script Commands.   Alternatively if you translated the macro to a script you will be able to schedule it as usual.

Recorded macros consist of very low level system commands.  Each key press and mouse click is treated separately.  Consequently when you edit a translated macro you will find that each Send Character/Text> command has only one letter after it which represents the key that was pressed.  Furthermore, where you might choose to use a LClick if you were writing a script manually, the program will use one LDown followed by one LUp command, possibly with a wait statement between the two.  There will be many wait statements.  This is necessary for the macro to reflect as accurately as possible what took place during the record.  The only time you will find that the program has simplified things is when interpreting mouse moves.  The only mouse move given will always be the last one before a different command.  This speeds up playback and keeps the script file much shorter (Moving your mouse slowly across the screen can create hundreds of mouse move messages, but in a script only the last one is needed).

Macros that are not translated will be played back more precisely than those translated, since each recorded Windows message can be replayed just as it was sent.


Playing Scripts and Macros

To play a macro or script without scheduling it use the 'Run Now' button on the main window. When running a regular script the 'Run Now' button will become a 'Stop' button. The script can then be cancelled during its execution.

The menu that pops up from the icon in the task bar also has an option called 'Break'.  This works like the 'Stop' button and allows you to cancel the execution of a script.  This option is available even when a script is executed automatically by the scheduler.

You can run recorded macros within ordinary scripts by using the Macro> command. See Script Commands.

Macros can also be assigned to desktop shortcuts or run from the command line. See Creating Desktop Shortcuts and Command Line Option.


Creating Desktop Shortcuts

You can tell Macro Scheduler to create a shortcut for a macro by selecting the appropriate macro from the main window and then clicking the right mouse button to display a pop up menu.

Select the last option and a shortcut will be placed on your desktop. To run the macro you then only need to double click your desktop icon. Once it is on your desktop you can, if you prefer, move it elsewhere in the usual way using explorer etc.


Command Line Option

It is possible to run macros from the command line using the following syntax:

msched macroname

e.g. to run the Defragment Disk example script you would type:

msched Defragment Disk

This is useful for creating shortcuts and running Macro Scheduler scripts from other programs or from macros created in other applications such as Word or Excel.

However, if you want to create a shortcut, you can get Macro Scheduler do it for you. Click here for details.


License Agreement

Macro Scheduler is Copyright (C) 1997, MJT Net Ltd

All rights for this software are reserved by MJT Net Ltd.

You are not allowed to modify or reverse engineer the contents of the program file.

Macro Scheduler is Shareware. That means you can use it free of charge only for 30 days to evaluate the product. After that, you must either register your copy by paying the license fee, or stop using it.

This software cannot be resold or used in any profit-generating activities, including, but not limited to, distributing Macro Scheduler as part of commercial products, or in support of commercial services, without expressed written permission from MJT Net Ltd.

There is no warranty or claim of fitness or reliability. The program is distributed AS IS, and MJT Net Ltd shall not be held liable for any loss of data, down time, loss of revenue or any other direct or indirect damage or claims caused by this software.

Copyright © 1997 MJT Net Ltd, all rights reserved


Registration

Why Register ?

The License Agreement specifies that you can use Macro Scheduler freely for evaluation purposes only for 30 days. After that time you must register it.

As well as legalising your copy of Macro Scheduler, registering will bring you the following benefits :

•	Limitations will be lifted (Until the program is registered there is a limit of two macros and scripts are limited to 15 lines).

•	Technical Support

•	Free updates

How much does it cost ?

The cost of registering one copy of Macro Scheduler is :

40 USD

Are there any multi-user licenses ?

Yes, the following table outlines the current licensing options available and their costs :

License	Price (USD)

5	150

10	260

25	600

50	1000

100	1400

500	4000

1000+	6000

How do I register ?

Registration can be carried out on-line at www.shareit.com

Shareit accept all major credit cards and can also accept payment by post and money transfers.

To register, point your browser at www.shareit.com and enter 100312 in the register program text box. This will take you to the Macro Scheduler page from where you can complete the registration form.

After completing the registration form on line you will be emailed a username and a registration key. From the about box click on 'Register' and enter your username and registration key. The limitations will then be lifted and you can have as many macros as you like and much bigger scripts.

Alternatively you can contact MJT Net Ltd by post, phone, fax or email as follows :

MJT Net Ltd

19 Dorchester Court

New Hartley

Tyne & Wear

NE25 0SS

UK

Phone/Fax : +44 (0) 191 237 2998

Email : sales@mjtnet.demon.co.uk


Support

If you are a registered user you can get support by emailing us at :

msched-sup@mjtnet.demon.co.uk

Please also send bug reports, comments and suggestions to this address.

For hints and tips have a look at the Scripts & Tips page at :

http://www.mjtnet.com/arch/scripts.hts

Keep an eye on the MJTNET Software web site for new product announcements and information:

http://www.mjtnet.com/


Script Commands

The following table shows a list of commands which require a parameter or value to be entered :

Command	Description	Value Required

Run Program	Runs a program/command	Command line to run

Execute File	Executes a file using its association 	Full path to file

        	e.g. Specifying a .doc file will invoke

Word & load the document.

Macro	        	Runs a pre-recorded macro	Pre-recorded macro to run

Change Directory	        	Changes directory	Directory to change to

Wait	        	Waits given seconds	Seconds to wait

Send Character/Text       	Sends given text	text to send

WaitWindowOpen	        	Waits for given window	title text of window*

WaitWindowClosed	        	Waits for window to close	title text of window*

Setfocus	        	Sets focus to specified window	title text of window*

Label	        	Inserts a label in the script for 	A label name

branching control to

Goto	        	Branch to the specified label	A label name

IfWindowOpen	       	Moves to specified label if 	*Window title and label in the format:

given window is present	window title,label

Message	Displays a message	Message text to display

DeleteFile	Deletes a file	The file to delete

CopyFile	Copies a file	Source File and Destination in format:

Source,Destination

MoveFile	Moves a file	Source File and Destination in format:

Source,Destination

EditIniFile	Edits contents of an ini file	Filename,Section,Entry,New Value

MouseMove	Moves Mouse Cursor	Coordinates to move to : Xpos,Ypos

e.g. MouseMove>550,254

IfFileExists	Moves to specified label if	Filename and label :

given file exists	filename,label

IfFileChanged	Moves to specified label if given file date	Filename,[<,>,=]days old,label

is in range of days specified.	e.g. to see if test.txt is less than 30 days old:

test.txt,<30,end

*Window title text no longer has to be an exact match. If the last character specified is an asterisk (*) Macro Scheduler will first attempt to setfocus, or find, the first window whose title matches the text entered exactly. If it cannot make an exact match it then looks at all windows and sets focus to the first one it finds whose title contains the entered text. This solves the problem with applications such as Word or Netscape which change their titles depending on the document loaded. It is best to try to provide an exact (including case) window title to ensure the correct window is found, as many applications have multiple invisible windows with similar names.  Specifying text without a trailing asterisk will force Macro Scheduler to only look for an exact match.

The Wait command is quite important. Imagine starting your word processor. It takes a few seconds (sometimes longer!) between starting the program and it being ready for your input. The Wait command can be used to make sure that Macro Scheduler does not start sending the next command before the receiving program is ready. The time you should specify really depends on your computer and what is running at the time. The only way of knowing exactly what to enter is by trial and error. Go through the motions manually before building the script and note roughly how long everything takes.

Of course, you could use the WaitWindowOpen command to wait for your program to appear before the script continues.

The list below contains the special key press and mouse commands which do not need a value.

Notice that for some keys there is a Release command. This is to cater for situations where these keys are used with other keys, particularly when using 'Hot Keys'.

For example to exit a program you would press ALT and F together to activate the File menu, followed by the X key to select the Exit option. To simulate this in a script you would Press ALT, then send the text FX and finally Release ALT. This would appear in the script window as :

Press ALT

Send Character/Text>FX

Release ALT

Be careful to make sure that if one of these keys is pressed you always release it again, otherwise you may find that everything you type after running the script is being interpreted as though you were holding one of these keys down while you type !! Pressing it again usually clears this anyway !!

Press Backspace

Press Tab

Press Enter

Press Esc

Press F1

Press F2

Press F3

Press F4

Press F5

Press F6

Press F7

Press F8

Press F9

Press F10

Press F11

Press F12

Press Home

Press End

Press Up

Press Down

Press Left

Press Right

Press Page Up

Press Page Down

Press Ins

Press Del

Press Shift

Release Shift

Press CTRL

Release CTRL

Press ALT

Release ALT

Press ALTGR

Release ALTGR

LClick

RClick

LDblClick

RDblClick

LUp

LDown

RUp

RDown


Hot Keys

Each script can be assigned a hot key to allow the script to be launched from a keyboard shortcut.

To assign a hot key select the tab marked 'HotKey' from the script settings window and select a key from the drop down list.

Press OK to save the settings.  No matter what program you are working with, as long as Macro Scheduler is running, the chosen key combination will now launch your macro.