Posts: 6
Threads: 3
Joined: Oct 2007
I cannot seem to create a macro where the code exceeds 32768 characters. Is this intended? Is there an easy way around this limitation, or should I just break the code up into functions?
Thanks!
David
Posts: 576
Threads: 97
Joined: Aug 2007
The size limit is 32 KB. If your macro needs to be bigger, split it into functions.
Macro:
Code...
Function1
Code...
Function2
Function1:
Code...
Code...
Function2:
Code...
Code...
Posts: 473
Threads: 33
Joined: Aug 2007
Please search the forum before starting a new topic; your question may have already been asked and answered.
This link has some information about your question.
Macro Size Limit?!?
Taking on Quick Macros one day at a time
Posts: 576
Threads: 97
Joined: Aug 2007
yep thats exactly where i got my answer from, if you do not know how to search just look at top and click "Search" button then type in your specifics, then click search and it will show threads with your specifics!
Posts: 6
Threads: 3
Joined: Oct 2007
Thanks. I actually did run a search, but didn't find the above post. I guess I was also a little shocked that there was such a limit (I assumed it was just an anomaly on my system). I would be curious to know why this limit exists, as it is an inconvenience.
Posts: 473
Threads: 33
Joined: Aug 2007
I actually believe the 32K limit is a little large, since I personally have never come close to reaching the limit simply by giving a command to trigger a new macro rather then putting it all inside one. This method seems to be very useful but i'm not sure why there is a limit.
Taking on Quick Macros one day at a time
Posts: 1,271
Threads: 399
Joined: Mar 2003
QM Assistant Wrote:
but i'm not sure why there is a limit.
because gintaras made so.
hock:
Posts: 473
Threads: 33
Joined: Aug 2007
Yes he did. :!:
Taking on Quick Macros one day at a time
Posts: 576
Threads: 97
Joined: Aug 2007
:lol: :lol: lol cuz he made it
:!: :!:
Posts: 12,073
Threads: 140
Joined: Dec 2002
I don't remember exactly. It is related with compiled QM code generation. To make it smaller and faster. Now it is difficult to change. My biggest macros are 7-8 KB.
Posts: 576
Threads: 97
Joined: Aug 2007
is it possible to figure out like how many lines a code is and how big it is and how many characters with out counting it?
Posts: 12,073
Threads: 140
Joined: Dec 2002
Move the mouse to the button 2 in the main QM toolbar.
or
_s.getmacro("")
out _s.len
out numlines(_s)
Posts: 576
Threads: 97
Joined: Aug 2007
Wow gint worked perfect thanks!
Posts: 38
Threads: 12
Joined: Oct 2007
to decrease the line in dialog, is posible to group the event if more than 2 case have a same instruction.
ex.
case 1001 function_1
case 1002 function_1
until
case 1010 function_1
Posts: 12,073
Threads: 140
Joined: Dec 2002
Posts: 38
Threads: 12
Joined: Oct 2007
Yes, found it. Thanks a lot.