I know I've seen an answer to this question, I may have even asked it before, but right now all my searching in the Forum is coming up empty.
I want to add a "How This Works" comment to the beginning of a macro to explain the Hows and Whys of what I'm doing in it. A starting point would be a simple text list of the titles of all the actions in the macro.
So far my only way of generating that list is to collapse all the actions and then do OCR on a captured image of the macro titles. There has to be a better way.
Right-clicking on an individual action has an option to "Copy as Text", but that provides too much detail and it's one action at a time. For the whole macro, I have not found the equivalent export/save/share/copy format option.
I recall seeing such a thing, possibly even using it once, but I cannot find that use among my own macros now.
Also, I recall a comment, possibly in the same thread, that one should not have extensive comment documentation in the macros themselves because that makes the macro definition file unnecessarily large and therefore slower to update while editing.
Does anyone have any tricks for including a link in a comment to an external documentation file, such as a TextEdit RTF file, so that you could have that link in the macro and just click on it to see the doc for that macroand update it as the macro is developed?
So that's two questions:
How to generate a list of a macro's actions?
How to link to an external documentation file and easily open it from the KBM editor?
Are you thinking of keeping the doc in that disabled group? I'm not sure, but it's been my presumption that whether or not macros and groups are disabled does not affect the size of the macro file, and thus has little influence on how long it takes to write out the file with each incremental change. Thus disabling macros will not speed up the Editor when it becomes sluggish. That is my purpose in getting the doc into a separate file, especially when it's lengthy.
Maybe an AppleScript Observer could be created to watch for that folder being opened.
KBM does have a trigger for when a file is added or removed from a watched folder and there are several other products that do the same thing, trigger an action when a file is added or removed from a watched folder.
Perhaps there could be a Master Doc folder, and a separate Open Doc folder. The Read Remote Doc action wcould LINK the Master Doc file to the Open Doc folder, which would add a file to that folder without actually creating a "new" file, just a new pointer to the contents.
When triggered, %TriggerValue% is the name of the found new file, so that could be immediately editable. By making it a LINK a link instead of a copy, that would allow changes in the Open Doc file to be automatically included in the Master Doc file.
That's a little convoluted, but doable. How would it work in the KBM UI while actually editing the macro? You want it to be a Comment, as far as macro execution is concerned, and yet you want it to actually do things when you want to see the doc.
Are there any KBM Tokens that identify the macro currently being EDITED in the KBM Editor? Is that accessible through AppleScript? If so, then there would be no need to make any changes in the macro that is being edited, maybe only a comment that says, "This Macro is documented in the file xxxxxxx; press the ⌘⇧K hotkey to open it in a separate editor." Then pressing the hotkey would identify the macro currently open in the editor and open the corresponding doc. But I don't know if that aspect of the Editor is exposed anywhere.
I did read your posts more than once, but I don't understand whose "files" you are trying to create links for. In my first post, I was assuming this was just for you, yourself, and so I used the "file://" protocol. But now it sounds like you want this feature to work for other people too, but as we know they don't have access to your file system, which probably means I don't understand what you are trying to do. But maybe noisneil knows, so let's see what he can say to help.
The other day I managed to do that (ie, "linking to the forum") in my OCR speed test macro, using a button, where I created a link in the macro that brought the user to the web page where the macro was uploaded to. Maybe that approach might work. I had never seen anyone do that before I did it.
In order to do that I had to modify my macro after I had created the web page, because I needed the link to the web page. It was kinda a chicken and egg problem.
In that case August send yourself a private message containing your documentation; you can then link to its URL in the usual way, but only you will be able to access it. If later on you wish to make it public you can copy its content into a normal forum posting.
LOL! I'm not sure what problem you're solving here, but I'm pretty sure that to find an even longer way I'd have to go around the neighbor's barn too.
My apologies for not being clearer in my statement of the problem. I'm looking for an easy way to link to working doc that I use to keep track of the various layers, problem threads, and open questions in the process of developing a complex macro that includes what I hope will be a smooth and fast user interface. When I have an idea or a question, I want to get it written down right away, and if that's in an outside doc, then I want to be able to link back and forth from the macro to the doc and from the doc to the macro, if not in live links, then at least in an organized outline form that matches between the two forms.
My KBM editor is getting slow and sometimes misses characters that I type. I've read that I need to reduce the size of the macro file. A lot of my own macros have pretty verbose comments in them and I've thought that maybe I could put most of that into separate files, but still have it accessible when I need ot maintain or simply re-understand the workings of a macro. This is for me keeping track of my problem solving and development process, not (yet) intended as something for others to use. That's a whole 'nother problem.
THAT'S what I was trying to remember. That's what I remember using before.
I guess it's not intuitive to me (yet) that the Editor has a Stop Editing mode.
COOL! I'll try it.
On skimming it, it looks like it produces just a list of titles, while the "Stop Editing" method shows all the various settings too. So this may well come closer to my "Minimize all Actions and do OCR on an Image" technique.