> As for learnign from the code: there is nothing particularly elegant > about it; in fact, there is a lot of ugly code similar like that big > case statement in the win plugin.
There's something special you've done with powerpro, I have never seen any program run in as small a memory space as powerpro...and the only ones that get even close are one-screen programs that aren't too far from hello-world style apps. Goodness, notepad uses 3.5MB ram with nothing in it...it's something that you've done with powerpro. If it's so ugly, how can you have multiple concurrent scripts, that run back and forth in timings less than 20ms...you have bar, and menu draws, redraws and refreshes of dynamic content...functions that all seem to nest together, and still work...I'm sorry, it's just a miracle little program. No way around it. How can powerpro load into such a small bit of memory...is the problem with other programs that they load complete libraries that bloat their memory stack, why is your external library calls not cause things to bloat out of control like most programs? You must have some memory unloading or optimization code...you can see it working because you'll see memory usage shrink. Can anyone name any program that has 1/50th the functionality that comes even close to powerpro's efficiency? I certainly don't know of any...grc's utils are the only ones that get even close that I can think of off the top of my head, and they're all built in assembly, and most only do a couple things...you're under VC6. I thought just the nature of Visual C inherently caused mandatory library loads into the program that caused memory bloat...powerpro has always been one of those oddities I've never understood. Heck here's another, can anyone name another program that has documentation files that are bigger than the program itself. Another program that has such a fleshed out scripting language that can interface with any other language, or component of windows. I don't think the things that powerpro does is necessarily unique...heck 90% of them are just ways of using the different windows API's and logical functions to use those API's (schedulers, keyboard shortcuts, bar and menu subsystem etc) but it's how all those functions are wrapped together into such an efficient container. Autoit scripts, which are dynamically re-compiled depending on functions usually run at 2-4MB in size in memory...and it does a LOT less than powerpro does. There was another utility-style program (Powerscript?) that tried to do a lot of what powerpro does, but if I remember right it used around 10-15MB of Mem Usage, with another 20-30MB sitting in VM. As I recall, the bar and menu rendering in that program always felt sluggish because of all their graphics reliance. The things that make powerpro unique IMO are: - Standalone program, no need to install - No reliance on the registry - Tiny memory and CPU footprint when running - Obeys relative paths internally and externally for all functions - Plugin extendable - text file based configuration and addon scripts - access to just about every windows api function in one way or another from a single program Don't sell yourself short Bruce, powerpro is a little miracle program and we can't thank you enough for having made it. Thank you. David Troesch
