Difference between revisions of "How To Manage Spell-Based Macros"
(New page: __NOTOC__ CA does not provide a GUI supported method for creating or modifying Condition Macros or Action Macros. However, the function that these types of Macros provides can be crucial. ...) |
(No difference)
|
Revision as of 17:56, 4 March 2008
CA does not provide a GUI supported method for creating or modifying Condition Macros or Action Macros. However, the function that these types of Macros provides can be crucial. This article explains the steps to take for creating new or editing existing. Keep in mind, CA does not support any changes to the default Action Macros or Condition Macros and will not support any that you create. It is also highly recommended that you never modify the defaults, but rather copy them and create your own custom ones.
Step 1. Extract a Sample Macro
The first step is to extract a macro from the system and use this as guide. Take note of the macro's name the enter the following command: <source lang="sql">pdm_extract -f "SELECT del,fragment,lock_object,ob_type,sym,type FROM Spell_Macro WHERE sym = 'sample macro name'" > yourfile.txt</source>
Step 2. Add Your Script
Now that you have the sample macro extracted from the system, modify the contents of the 'fragment' column to suit your scripting needs. Remember to use \\0012 for your carriage returns and \ to cancel out the double quotes in your script.
Also, be sure to change the value of the 'sym' column or your new macro will not be loaded.
Step 3. Load New Macro
Run the following command to load your new macro into the system: <source lang="sql">pdm_load -f yourfile.txt -i -v</source>
Step 4. Extract New Macro for Additional Changes
Run the following command to extract your new macro if additional changes are required: <source lang="sql">pdm_extract -f "SELECT * FROM Spell_Macro WHERE sym = 'sample macro name'" > yournewfile.txt</source>
Step 5. Uploading Changes
Run the following command to extract your new macro if additional changes are required: <source lang="sql">pdm_load -f yournewfile.txt -v</source> Notice there is no -i this time. A -i is only used when creating on new macro, not when editing an existing one.
To discuss or ask questions about this article, select the discussion tab above.