Petko, please comment. As an advanced programmer, you can certainly give very valuable "2-cents" (as they say and worth infinitely more) to these things, and even the casual reader might be interested in such architectural considerations, for academic interest only. (And then, see below, we'll make high practical use out of it!)
Since I promised doing a macro and share it, as for an intermediate solution for the super tree, I had a lenghty look into AHK (Autohotkey) and AI (AutoIt).
I
AHK is a cluttered thing which cluttered syntax; real programmers should be rather accustomed to such ugly syntax since it's not the first time I saw this, but I will avoid using it at all cost, for this reason: Totally unnecessary "blocks" within curly brackets, this is horror! (And I'd need a lot of those blocks in my scripting!) And then, AHK, even after many years of development, doesn't have real arrays, let alone bi- or multidimensional arrays, and I'd need a lot of those!
I am aware that AHK does some sort of multidimensional lists, simili-arrays, but I hate those (because of an identical problem in TSE = The Semware Editor, besides this one of the finest if not most modern ones), and I'm aware now of another development of AHK, AHK_L, but then, I don't like those derivations and meanderings, could an open source project not being developed in a stringent, optimized way?
Besides, I came to something of a "review" of AHK where those faults and / or idiosyncrasies of AHK I had stumbled upon, and many more of them, were in length discussed by a fervent user of / developer in AHK... to a point that I said to myself, well, why doesn't he go to AI then, instead of endlessly hoping? (Whereas I clearly state why I am here with MI, not going to "competitors".)
The link to AHK is: http://www.autohotkey.com
The link to AHK_L is: http://www.autohotkey.net/~Lexikos/Auto ... on_History
And the link to that tremendous, very interesting paper on AHK, here some details:
Autohotkey
Constructive Language Criticism & Script Merging
Written by Miodrag Milic
Table of Contents
Constructive Language Criticism
- Labels
- WhiteSpace
- Variable Scope
- Strings
- Commands with the same meaning.
Multithreading & script merging
- Names
- Includes and autorun section
- Multiple GUIs
- Tray menu
- Message Handlers
- The final part – adding the flag
- WHY do wee need all this
- Running included scripts
Some Thoughts About The Future
is: http://www.r-moth.com/code/Autohotkey_Article.htm
But I acknowledge that the one intuitive thing in AHK is its key bindings, and of course, and this is its mass appeal I suppose (= for every one AI user, there might be 10 AHK users; for every one MI user, there might be 10 (or more) UR users... but then, we're overturning this

II
Thus, I went to AI!
There, I am very pleased with the "look" of the scripts (and I did scripting and some programming before, so that's not impossible for me), but I encountered the key binding problem, on which up to then I did never spare a single thought since in TSE the problem was hidden from me, and in ToolBook / OpenScript it also had been.
You know me, and thus I immediately entered into some lenghty profound considerations: Now I encounter a problem, the next second I want to know what it's all about!
So, please, Petko, read this thread there in their forum order to understand my problem (without my copying all that here) and to comment as an expert (in that forum they are obsessed with game automation which is the devil for them, and indeed I touched this subject without being too much aware of it, but I'm really hooked on the academic backdrops of it, not at least in game automation, so I WANT to know, and perhaps they will throw me out, and certainly won't give me a real answer there).
The link is: http://www.autoitscript.com/forum/index ... pic=120855
So I didn't only have the (perhaps idiotic) idea to trigger AI scripts with HK - and then, what would fellow MI users do??? -, but I've got to this idea, but it seems to have been wishful thinking up to now, but then, implementation would be rather easy I think:
III
My idea was, why not trigger macros = AI scripts by MI itself?
MI has the function "Insert-Hyperlink-File". This way, it should be possible to trigger a script or any other program, but clicking / double-clicking on such a hyperlink.
But hyperlinks are only possible in the text pane = editor, and thus, it is not possible to access such a script = file = command from anywhere in MI: There is no key binding possible by "Tools-Keyboard Shortcuts"!
But that is what I'm dreaming of, not a RUN command there in those shortcuts since it would then be necessary to do manual entering of that file in a dialog, which is not what we need, or even when configurable, this command would just be usable for ONE "macro" = script triggering.
What we need is a quite different RUN command, a variable one, or to put it in a more precise way:
*** To all those hyperlinks, it should be possible to assign individual shortkeys! ***
And then, we could do a quite normal item, somewhere in a topic that we always would load, and then we could do a list there of other programs to run, be it commercial programs or such AI scripts or whatever, and whenever, everywhere in the program, we would like to trigger such a program / script / macro / whatever, we just would press the assigned key / key combination.
IV
From a technical point of view, how to do this? Storing this in some topic (always loaded or not) does NOT seem to be a viable solution.
Thus, the "Insert-Hyperlink" dialogue should have the additional option "Assign to hotkey", and when the user does such an assignment there, the hyperlink is not only created in that given topic, but also, MI does store the key binding, with its target, in a table.
Such a table could have some 20 positions, and any key binding there could be overwritten by a new target, by the above-mentioned assigning.
A synching would not be mandatory (since perhaps too complicated for too little effect); users would then be well-advised to group their key-assigned bindings into a link group in a special item they would use just for this, since otherwise they could hardly remember those bindings if their corresponding links were splattered over 20 items in 10 topics.
Such a list of about 20 additional key bindings could easily be maintained by MI, just like there are, in the "Tools-Keyboard Shortcuts" dialog, there are groups of "Text Style: xxx" and "State Icon: User 1...12" key bindings - indeed, if you cannot easily maintain such a list but with only 12 entries, not more, this is not a real bad... since main problem for such Keys / Key combination always is, "how to remember all those?"
( Of course, GUI-wise you could separate this "Assign hotkey to hyperlink" function from the "Insert-Hyperlink" dialog, but then, many of the code lines doing the latter could be reused for realizing the former.)
V
Of course, since this function is not yet here, I'd first would have to do an AI script which includes that sleep loop in the above-mentioned AI link, and fellow users would need to be willing to tolerate such an "endless" script running while they use MI, in order for the triggering of the script, without internal MI key binding, to be possible from anywhere from within MI. (Afterwards, the same script, without it always running = without the loop, would do, since being triggered but the user just when he needs its core function.)
But you, Petko, are the programming specialist here: Can you advise fellow users to bear the running of such a script, or wouldn't you advise so?
VI
In fact there would be two functions = two macros = two keys needed (I know I could do ONE function, with user input, but then, splitting it up into two parts seems more reliable, more "natural" for most fellow users, since in a, this manual choosing your "project" can thus be done in a trial-and-error way, before triggering b), whereas, if "one macro only", no error in choosing the right categories would be allowed):
a )
- go to (or load) a topic "0" and there to first item "0" (both zero)
b )
- then, the user would manually enter an a...t character to go to the wanted category / working environment (first level; of course, those perhaps 3 to 20 first level categories should all begin with a distinct letter for this to function smoothly)
- then, the user would manually enter a 1...0 digit, in order to access the subcategories (second level)
- now we must see that this is rather ingenious if I might say so, since first-level categories will never be more than 2 dozens or so, so selection them by first letter of their name is perfectly doable and handy even in a very long time range
- and then, each such first level category might contain, in its text field, a group of ALL topics in it, whereas its subcategories (= second level) might contain SUBGROUPS of topics, "PROJECTS" or "reference standards" or whatever, e.g.
- X (first level) might contain 5 topics a, b, c, d
- - 1 XI (these second level) might contain a, b, c
- - 2 XJ might contain b, c
- - 3 XK might contain a, d, but also m (=not contained in X, it's just a matter to not create chaos)
- In order to not create chaos, you must manually synch after renaming, deleting, creating; for this, it would be handy to have a "global replace" for an entire topic, not just for one item, but up to then, we could easily use the global search function for "current topic", and then manually click and change / delete all those finds of a (renamed or deleted) topic name in the search results list.
- Now you must see, I numbered those subcategories (=second level), but I did NOT indent them! Of course, you can do as you please, perhaps you indent them in a seldom-accessed category, but not indenting is advisable at least for subcategories you will often access = load
- In fact, IF you indent those subcategories, you could easily do without that digit before each subcategory name, since you could access them by entering a second a-z character, but then, those characters should be distinctive
- In reality, I do NOT have any category (yet, and even long-range it seems) that has MORE than 10 entries, and thus, doing a number (and a space) before the "real" subcategory name is very hand for me since thus I do the (not-written-yet) macro "a)" and then I just have to enter a letter and then a digit before triggering my macro "c)" (not written yet either)
- Please be aware that the first characters on level 1 have to be distinct (but on each level 2 you can use all digits 0-9 again and again without any problem, it's just WITHIN such a sub-category that those digits must be distinct), but that you are not obliged to put them in alphabetical order! Thus, name your categories in a mnemonic way, but put those you often access, on top of the list, whereas you could put those rarely accessed near the bottom of your list... and perhaps could even collapse those at the end for better visual access of all of them at first glance
- But then, you should NOT have too many of those first-level categories, and then, since you KNOW the mnemonic first letter of it you have to press, JUST PRESS IT, and MI will show it to you, no need to indent any subcategories whatsoever!
- Of course, we then have again the problem I yesterday discussed in "Tree": Your "Z" category will be selected, but all its subcategories = "Projects" (indented or not) will be hidden under the bottom line of the tree pane (this problem of "not scrolling, and if scrolling, in the bad direction then" will be easily resolved I'm sure)
- And, be mnemonic, but allow for exceptions; thus, my archives are in the categorie "Z : Archives" and at the end of my list...
- And of course, you should format all your level 1 entries in bold, whereas all level 2 entries would be in regular face type, for cosmetic reasons
- Oh yes, and the very first item in my list, just for info reasons, is NOT "0" zero, but is (or begins with) a "_": why? Because this way, anywhere in the tree, you can
- I am aware that you could do, this way, much more levelling / indenting than I intend here for JUST TWO levels, but be aware that any really-programmed realization by Petko for all this will have three levels only (and that will be just enough of work to do just like that... and then, if you need more than this system "Category(1)-Project(2)-Group of Files(3)", you did something wrong in my mind, for most purposes; even lawyers could do more first-level categories in order to not have too many subcategories for their thousands of files), and that INCLUDES this next third level, i.e. the real files to load into the "projects"
c )
After having manually chosen his "project", the user would then trigger the second macro:
- focus in the text pane
- there, a group of files = topics to be loaded, in exactly this format:
FileX (in first line)
FileYTABComment
perhaps blank line
FileZTABComment
and so on (not more than 32 lines incl. possible blank lines)
- This is to say, you do them as a block, or in several blocks separated by blank lines, and each file con be upped up by a comment (yes, I NEED those comments, 1- or 2-digit or "real" file names, then for status info!), and this comment will be separated by a (= at least one) tab, i.e. you can use several tabs in order to have order in your things when, by long topic names, for other comments you need several tabs instead of the usual one tab.
- Just enter the names of the files = topics, without the ".mio" suffix; in fact, each line with a file must NOT contain any other character, not a point, not a colon, not a whitespace, not a ", nothing, EXCEPT for when those characters are put after a tab. (If you do otherwise, no error will occur, but the intended files will not be loaded.)
- I say 32 lines because loading 50 files at once would not be reasonable; then your "project" is badly conceived, isn't it? Then, those first 32 lines of your text would be read into an array (with 32 positions, and it would be nil before since we don't want it to conatain any left-over entries from a former, "bigger" project, that goes without saying), then each array position would be read into a string, in which a tab would be searched. If a tab is found, all text after and including the tab would be eliminated.
- Then, all not nil lines of the first array would be evaluated if they correspond to existing .mio files in the given directory (see below), and IF they exist as such files, they are entered into a second array (with again 32 positions of which most of the time only a fraction will be used, and being put to nil before, of course), with that ".mio" suffix added by the macro.
- Most important, it's the macro that will also do these " space " around each file name (and just a " before the first and after the last one), in order for them to be loaded altogether, and this way, your file names in your text panes will be neat looking, which is most important. This is to say, the macro will put your file names, and only those, in a loadable list of files (which can perfectly consist of just 1 and, as explained, of up to 32), then load that file. (Any other text in your text pane will thus be ignored, so you can clutter it at your will, but just do some lenghty commentaries in the lines after your file list(s) at the most, do not try to clutter those special items with normal notes.
- Now for the directory in which those files must be. I have them in "c:\MI\", and that's it, and thus I could do such a macro searching the file names in (and loading the files from) exactly this directory, but I'm aware that this would be rather useless (or incredibly patronizing) for fellow users. So we'd need a "relative directory path" or, perhaps better, a path that will determined by your presetting in MI's "Options-Save-File Locations". At this point I do not know too well how to get it from there, since you would not want to have my macro put this dialogue up on the screen each time you trigger it in order to look it up from there, and since MI doesn't write anything into the Win registry, where the h*** could I = my script find this path? Thus, some help from Petko in this aspect will be needed since the MS ".ini" file (= in which the needed info will to be read) will have a path I and my macro will not know from start on either!!!
VII
AND USE SIMILAR SYSTEMS FOR EACH OF YOUR TOPICS !
- Thus, make the first entry (and only that one) begin with a "_", no easier way to access the top of your topic in just ONE key pressing (when you are in the tree that is, and even from everywhere when you use a macro to do it.

- Use digits for your main headings in you topics, in order to instantly access them. ( Just name them "3 MyItemXXX" instead of "MyItemXXX": before export / printing, that could easily be deleted by another macro.)
AND SPLIT UP YOUR TOPICS !
- As explained here and everywhere in my posts here, you will rarely long again for hoisting: In fact, my system spares Petko to resolve that hoisting problem (and which would be a LOT of work, without that much real benefit).
- And at last, I know, hoisting is so well done in UR, cloning is tremendous there... but can you imagine my 100,000 items, and 10,000 more each year, all cluttered in ONE UR database? Even with their hoisting, even with their cloning, UR is TOO MUCH!
Whereas MI will be the utmost elegant working space soon.
