Posts: 82
Threads: 31
Joined: Oct 2007
I created a Dialog with 16 options to choose from. The user selects the ones they would like to run and then they are carried out.
The problem is that it appears that the Macro is full and will not let me go any further. I cannot type or add anything else. If I delete some stuff from the Macro I can add as much as I removed.
Is there a size limit?? I would think I could make the macro as long as needed. If there is a size/word/character limit, is there a way around this??
Any help please..
Posts: 473
Threads: 33
Joined: Aug 2007
I'm not sure if there is a size limit, but what you could do is set your dialog up so that once they choose an option, for what ever option they choose, it runs a different macro.
Taking on Quick Macros one day at a time
Posts: 82
Threads: 31
Joined: Oct 2007
I tried that but I can't figure out how to make it continue execution of all options selected in order. For example: If the user checks 2 different options in my dialog, I can get it to execute the first option they choose, but I can't figure out how to make it execute the second or third or fourth options they choose after the first has been executed. I don't want all options to run at once, I want it to wait until one macro is finished and then execute the next checked macro. If somebody could help me figure that out, it would help tremendously.
Posts: 11,869
Threads: 138
Joined: Dec 2002
The size limit is 32 KB. If your macro needs to be bigger, split it into functions.
Macro:
...
if(!ShowDialog(...)) ret
if(c3Che=1)
,Function1
if(c4Che=1)
,Function2
...
------
Function1:
------
Function2:
------
...
______________________________________
If the macro must share its variables with the functions:
Macro:
...
int i
str s
...
Function1 i s
...
Function2 i s
...
------
Function1:
;/
function int&i str&s
spe -1
more code...
------
Function2:
;/
function int&i str&s
spe -1
more code...