dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: October 09 2012 at 18:50 | IP Logged
|
|
|
Peter,
I agree with Tony. Not sure how it would be really useful. To add this functionality would require mods to the macrodetail table which would then require updates to all exports, etc.
However, you can implement this functionality easy enough yourself. One way would be to use globals that are checked like Tony suggests. Another way which will quite closely duplicate your request is detailed below.
First, make the first line of every macro an "End Macro" command and then click the "Skip" column. This will be the default. To disable a macro, just use this formula:
Code:
ph_directsql("update macrodetail set skip_line = 0 where type = 39 and sequence = 1 and id = 'YOUR_MACRO_ID'") |
|
|
To enable a macro, use this:
Code:
ph_directsql("update macrodetail set skip_line = 1 where type = 39 and sequence = 1 and id = 'YOUR_MACRO_ID'") |
|
|
Simple. If you'd like to programmatically add that first line to all of your macros, open the PH Multi-editor and switch to SQL mode (shift-F5). Then run this SQL command:
Code:
update macrodetail set sequence = sequence + 1 |
|
|
After the above completes (make sure you ONLY run it once), run this SQL command:
Code:
insert into macrodetail select id,1,39,null,null,null,1,null,null from macroheader |
|
|
Thats it. Every macro will now have as the first line a "skipped" End Macro command. You'll now be able to quickly enable/disable macros via code.
You may want to make a backup of your database before trying the above. I tested everything and it worked fine on my system but just to be sure...
Hope this helps,
Dave.
|