Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
32768 Character Limit
#1
Is there any possibility this can be increased ?
Or any roundabout way to go over the limit ?

(I can't divide my macro into functions, it has to be all in one)
#2
Is it macro/function, or menu/toolbar? In next QM version (QM 2.1.8 or 9), menu/toolbar size limit will be increased. Maybe macro/function too, although it is more difficult to me.

Could you email me the (part of) macro?
#3
It's a macro.

I'm not sure if there's any pointing sending it. The basic text that takes so much space is a series of pixel scans and statements like
"if pixel X is so and so and pixel Y is not so so, then click at A, wait, click at B" and so on.

There are many ways to make it shorter and more economical, I'm now making those adjustments, so it's not a big problem.

But it would be really convenient if future versions had larger capacity.

Thanks though for the quick reply!
#4
how long can be an argument via commandline ?

i have a local html file with timymce editor (wysiwyg editor) from with i pass
via run: Protocol Handler the edited content to qm.

Code:
Copy      Help
    function mysave() {
        window.location.href = "run:qmcl.exe?Q* M*emis_de1* A(§) 1§" + tinyMCE.getContent();
}

maybe i have to slice the tinyMCE.getContent() into pieces and pass the resulting amount as arguments to qm.

i have 8 html pages in my toolbar, until i have a htmleditor with controls there is no way to avoid using those sites.
pi
#5
a screenshot of my toolbar:
http://fapomatic.com/19/snapshot20060509040937.jpg
pi
#6
I tested on XP, it is 2 KB. If you can use SendMessage from the script, it is practically unlimited (I tested with 5 MB file).
#7
problem is that the html file is running local.
its pure javascript to qm.
no serverside script.
pi
#8
btw. the screenshots belong to my oscommerce client.

it still needs a lot of work ...
pi
#9
Alex Wrote:Is there any possibility this can be increased ?
The leaner, the better. :!: :lol: Here's five reasons on how the way it is now helps us.

As-it-is Benefits:
  • Easy solution: As you've discovered!: "There are many ways to make it shorter and more economical, I'm now making those adjustments, so it's not a big problem." However, "But it would be really convenient..." betrays a disordering laziness in relation to this next point:

  • Good Coding Practice: It encourages us to modularize, clean up, & make code more manageable. So I actually LIKE the 32K limit!

    I too got frustrated when one macro kept hitting 32K. But look at the results:
    • A tug: Made me repeatedly break up the long complex macro into more manageable & readable byte-sized chunks. Confusedhock:
    • A hug: Made the code cleaner, more organized, easier to maintain! :wink:
    • Be smug: Unique names given to functions are self-documenting; and use of functions reduces the size of their callers: It's easier to read through a main macro that calls color-coded self-explanatory functions, than to have to scan through a mountain of code to find out what the macro is doing.
    • No shrug: Allows me to more easily understand the code years after I wrote it, and will allow others to understand the source code if and when it's released.
  • Function reuse: Modular code can be more easily reused in other macros & functions, thus saving space & development time.

  • Speed: General speed may suffer if the limit is increased: One of my CPU-intensive functions saw up to a 6% speed decrease in QM 2.1.8 (Alpha) vs 2.1.7 (details to be posted later as part of another post). Although such an intensive function is best converted to compiled C++ -- which QM is not meant to totally replace -- it nevertheless illustrates the point that having more might have affected speed, so having more may not be the best thing if we can do well without.

  • Other needs: If we can do well without the feature, it would leave more time for Gintaras to build other more essential features.
I no longer see it much as a limit, but as a boon to efficient coding. :mrgreen:

Tips:

If you think your code can't be broken up, think again, use your brain. It usually, if not always, can. A web page has links instead of burdening you with a mountain of info at once; so too must complex macros have functions. A home has doors to various rooms; your macros can have doors to functions each designed for a specific task.

QM is a monolithic macro program & development environment: a coder's dream come true. Its 32K macro-size limit perhaps makes the program lean, mean, and not bloated like other software becomes. It's served me well in thousands of hours of programming since QM v1.3.3's debut in 2001 (yet I only know perhaps a tenth of its power...!).

Having trouble breaking up your code even after wracking your brain? Just post or send me a message. I could possibly help. Cool Arrow


Forum Jump:


Users browsing this thread: 1 Guest(s)