@peternlewis Hey Peter - Let's say that I take some KM XML and edit it in a text editor. Then I put it on the clipboard with the appropriate clipboard type, and paste it into KM.
I know that KM will ignore it if it's not valid - in other words, if I messed up the tags or something like that.
But can you envision a situation where I mess up something in the XML, but KM accepts it anyway, and because of that, KM can't load its macros anymore?
I know nothing's 100% bullet-proof, but I wondered what your thoughts on this are. I'm thinking that once you convert the XML into your internal object format, the objects will be "valid" no matter what. The worst that could happen is that I'd be missing some values or something.
I hope this makes sense. What do you think? Thanks.
I don't believe there is any way to break the macros by inserting an XML of the action. The XML will either be parsed properly in to the action, or parts of it may be ignored, or the entire action might be ignored.
But I can't think of any case where it would do damage to the macros (obviously, running the action can do damage, that would depend on what the action was, or potentially how it was mis-interpreted if the XML was broken in some way).
That says a "Macro Factory" is a viable and safe enough thing attempt.
But is there a better way to automatically connect a KM macro?
BTW @DanThomas I'm intrigued as to your use case. Macro Factory would be mine, as I think I indicated above.
Thanks, Peter, for verifying what I was thinking.
What's a "Macro Factory"? And as for the reason I asked the question, you'll see shortly.
Something that automates making macros.
Looking forward to your news.
Ah, that makes sense. And good timing on your response, because I was able to add an "Other Uses" section to the post for my new macro KMET: Edit KM Objects as Text (Search & Replace).