Howdy folks, I'm scratching my head here trying to figure out why I'm not able to append an image file to a rich text document. Below is a screenshot as well as the macro itself in question (note that the first action is to run an Internet speed test using speedtest-cli, which is disabled as not everybody has it installed, and it's not the source of the problem).
Basically the shell script uses json to parse the results, from which I use RegEx to grab the "Share" URL (which is a PNG image file), saving it to a local variable. I then use the get URL action to save that image (stored in the local variable) to the system clipboard.
The follow action is where it fails...the write system clipboard to file. Below is the error message Keyboard Maestro gives me.
2021-09-17 12:22:47 Write File action failed to read source text 2021-09-17 12:22:47 Write File action failed to read source text In macro “Trying” (while executing Write System Clipboard to File).
I'm not sure why it's not able to write the file to the RTFD file, as I have verified that the system clipboard does indeed contain the image itself. I have tried different methods, such as appending to file, but when I select append, the only format option is plain text which obviously won't work.
So is this simply the wrong action? Or is it not possible to write an image to a rich text file? Or is there some other issue I'm overlooking here? Thanks in advance for any help!
EDIT: One more thing I just remembered, even though I can open TextEdit, and paste in the image from the system clipboard, and save it as a RTFD document, whenever Keyboard Maestro tries to write the clipboard to the same file, it gives me that error, and moves the file to the trash! SUPER strange...
Internet Speed Test (speedtest-cli) (for testing) (for export).kmmacros (3.2 KB)