Difference between revisions of "How To Manage Spell-Based Macros"
m |
m |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | <div align='center'><font color="green">To make corrections or additions to this article, select the ''edit'' tab above.<br> | ||
| + | To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div> | ||
| + | |||
| + | == Overview == | ||
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. | 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== | + | == Procedures== |
| + | === 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: | 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> | <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 === | |
| − | == 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. | 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. | Also, be sure to change the value of the 'sym' column or your new macro will not be loaded. | ||
| − | + | === Step 3. Load New Macro === | |
| − | == Step 3. Load New Macro== | + | |
Run the following command to load your new macro into the system: | Run the following command to load your new macro into the system: | ||
<source lang="sql">pdm_load -f yourfile.txt -i -v</source> | <source lang="sql">pdm_load -f yourfile.txt -i -v</source> | ||
| − | + | === Step 4. Extract New Macro for Additional Changes === | |
| − | == Step 4. Extract New Macro for Additional Changes== | + | |
Run the following command to extract your new macro if additional changes are required: | 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> | <source lang="sql">pdm_extract -f "SELECT * FROM Spell_Macro WHERE sym = 'sample macro name'" > yournewfile.txt</source> | ||
| − | + | === Step 5. Uploading Changes === | |
| − | == Step 5. Uploading Changes== | + | |
Run the following command to extract your new macro if additional changes are required: | Run the following command to extract your new macro if additional changes are required: | ||
<source lang="sql">pdm_load -f yournewfile.txt -v</source> | <source lang="sql">pdm_load -f yournewfile.txt -v</source> | ||
Notice there is no -i this time. A -i is only used when "inserting" a new macro, not when editing an existing one. | Notice there is no -i this time. A -i is only used when "inserting" a new macro, not when editing an existing one. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 06:34, 26 July 2008
To discuss or ask questions about this article, select the discussion tab above.
Overview
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.
Procedures
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 "inserting" a new macro, not when editing an existing one.