Anasoft
Autowork User's Guide
5. Editing a
Macro
Contents 5.2
Editing the Properties of a Macro
5.1 VME - The Integrated Visual Macro Editor
VME (Visual Macro Editor) is main UI to edit an Autowork macro. It's both the
general purpose macro information editor and the macro instructions editor. As
shown in Pic UG-5.4-1, the parts above the long horizontal line are the place
to edit macro instructions and to debug the macro. The commands below this
line are for general maintenance purpose.
We
will describe the second part of commands in this page. The part to edit
instruction of a macro will be discussed in 5.4.1 Editing Macro Instructions in the VME.
Pic UG-5.1-1 VME (Visual Macro Editor) is the integrated
environment to maintain your macro
Edit
Properties, Variables and Instructions
Edit
Script
Temporary
Macro
Validation
Check
Run
the Macro
Save
Changes
Some of the properties are self-explanatory. Here we discuss
some other that you may hope to know more:
Edit
Properties, Variables and Instructions
Information for an Autowork macro can be divided into 3 parts -
properties, variables and instructions. You can click the Edit Properties button to edit the macro properties, click the
Edit Variables button to edit the variables of a macro. You can edit
the instructions of the macro, the major part of the macro, directly in the VME body.
Edit Script
All information of an Autowork macro is saved in a script file
(filename.awm). This is a plain text file if the macro is not encrypted. If
it is encrypted by a password (you can set or clear the password in macro
properties page), you cannot read the awm file directly.
You
can click the Source button in the VME to
edit the script of the macro in VME at the current status. The file opened is not the original
awm macro file, but a temporarily created plain text script file. The script
is easy to understand if you have some programming experience. After you
modify this script file and save changes before closing it, VME will prompt
you to reload changes from this script file to VME.
This provide you with a convenient plain-text way to edit macro.
Notes:
1) If you choose to accept changes from this script file, all
changes you have made in the VME since the time you open this script file by
clicking the Source button will be abandoned.
2) The script file can be saved and its changes can be accepted
for only once. After you accept changes from this
script file for once, Autowork will no longer monitor changes to this file, and
even if you continue to change this file and save changes, you will no longer
get prompt from Autowork to accept changes. This is to protect unwanted loss of
further changes within the VME after changes of the script file has been
accepted. If you want to continue modifying the macro with a script file, click
the Source button to open another script file and do what you want with the new
file.
Temporary Macro
When
you create a new macro, Autowork will assign a default macro title for it. But
it's your responsibility to assign a path for the macro to be saved
to. If you create the macro just for temporary use,
you can check on the "Temporary Macro" check box, then you are no
longer required to decide the path by yourself, Autowork will automatically
decide a valid path under the temporary macro
path folder under Helena User Data Directory based on current macro title. The
temporary path will be in the form:
<Helena
User Data Directory>\pack\temp\<Macro Title>.awm
An
example is "D:\Anasoft User Data\Helena\Pack\temp\New Macro.awm".
Validation
Check
Autowork
will perform validation check each time before it runs, debugs or saves a
macro. You can also perform the validation check independently by clicking the
Check Validation button in the VME. Autowork will check
for possible problems in your properties, variables and instructions. Autowork report problems in terms of Warnings (minor problems, Autowork may
get it through in some way or omit it, but it may against your original
purpose in writing the code) and Errors (major problems, you cannot run a macro if errors were
found in a macro).
Run
the Macro
This
is the same command as the one in the control panel. You can only run a macro
if it has passed validation check to be an error-free macro.
Save
Changes
Autowork
will automatically save changes if you press "OK" button to exit
editing. However, you may also choose to save changes at any time manually.
|