I'm trying to create a macro that copies a SimpleNote note to the clipboard, splits the title from the body of the note, creates a new plain text TXT file with the body as the body, and then prompts me to save the file with the first paragraph of the note (the title) inserted as the filename. I'm not having much luck.
Below is what I have so far, adapting this Evernote macro (and a bunch of disabled alternate method attempts). Copy happens, TextEdit creates a new document, pastes in the body, but then stops; nothing is saved. If I set the save document line to "save document 1 in "/Users/pariah1/Desktop/TEST DOC.txt"" I'm given the error "the document "Untitled 4" could not be exported as "TEST DOC.txt". You don't have permission."
Because the discussion between @ComplexPoint and myself became very off-topic and involved, but a very good discussion, I have moved it to a new topic:
Guess things have changed as this script no longer works. It prompts for a file name then turns the target folder into a file. Do you have ideas on how to update this?
Also, could it be tweaked to simply output a file for each line of text in the system clipboard without the prompt?
Since we have no prompt here, you have to pre-set the desired parent folder in the green action (replacing my example path).
As with the original macro, there arenât any error checks, e.g. for filename-incompatible characters. But usually these get converted to compatible replacement chars. If not, youâd have to separate title/content and add some filtering for the title.
Checking my understanding: The forward slash between the two variables "%Variable%Local Parent Folder%/%Variable%Local Line%.txt" is saying write each variable parsed by the "For each" action to the variable Local Parent Folder which is a pathway that is set in the first action. Yes? Or is there a clearer way to understand this?
Yes, the Local Parent Folder variable (set in the green action) must contain the path of your desired parent folder.
Then, the complete path (which is the parent path + the last path component aka filename) is composed in the Write action, for each clipboard line. The slash separates path components, as usual. (If you prefer, you could also add a slash at the end of your parent path (green action) and remove the slash from the Write action.)
Then, slash means something like âandâ which requires something both before and after, yes?
Also, why would I prefer to move where the slash occurs or are you pointing that the write action doesnât require it be located somewhere particularly?
If you don't understand computer paths by now, you need to put in a little study time. Path is a very basic and essential concept for working with files and folders (directories).
My understandings are an inch deep and mile wide. Coupled with uncertainty about how KM might be doing something unique to KM leaves me without confidence in my knowledge.
As I drop pretending to know, the gaps I've glossed over show up. This is an instance of firming up the base.
This probably looks strange as I do not see many people doing this kind of work publicly. Maybe it's time for some private lessons. It's all study time now.