If I understand correctly, this means it fires off for every new file added to the folder, but will wait until the process has run its course before continuing?
Yes. Also when two files arrive almost at the same time it will process one after the other. Without the semaphore lock the instances of the macro would interfere with each other, especially with the “For each” loop you had in the original macro.
To see what I mean: open the debugger (in the KM menu) and drop 2 or more files into the watched folder. You’ll see that for each file one instance of the macro will run. (Without the semaphore lock.)
This is done with a mouse click, as dragon does not let you do this with keyboard shortcuts, and I couldnt get KM to recognise the button. But it works.
Please have a look at my macro. It should be possible to open the file in Dragon with an “Open file with Dragon” action. (The same as I have done it with TexTEdit and Evernote.)
at this point I simply want to copy and paste the text into Evernote.
If you just want to get the text and don’t have any need for previewing or editing in TextEdit, then there is no need to pass the file through TextEdit. The same as above: use an “Open file with…” action.
the other thing is I want to select the MP3 file that was just processed and append/attach it to the same evernote note I just created. Again, doing all of this over the GUI with Keyboard shortcuts maybe isnt the most beautiful and efficient way to accomplish the result, but it gets the job done and it works. With more than one file in the folder I nee to figure out how to ensure the right file gets selected...
No, for opening the mp3 in Evernote, you should not need UI scripting either. “Open with…” should also work here. The path of the original mp3 file is still in the variables! So, no need for guess-work or mouse clicking on files in the Finder!
Once the file is open in Evernote you may use some keypresses to attach it to the correct note. Not sure, I don’t use Evernote. But Evernote is also AppleScript-able, I’ve seen.
The problem I was facing is mainly the processing of files, that doesn't seem to do anything. I move and rename the file, but it doesn't work.
This definitively works now in the prototype macro.
Your other post about the deleting of all the files in a folder was helpful though
Oh, yes. I forgot about this. Just attach it at the end, with the appropriate path variables. But, please don’t use automated mouse clicking in the Finder to select files for deletion
I will go through the macro you sent me and adjust it a bit for using it with Dragon and try it again. I'll post back here if I could get to to work!
I think the prototype macro contains almost everything you need for doing it in a cleaner way. Just take your time and try to understand how it works.
Once you have your final workflow working, or almost working, we can optimize it, for example by replacing remaining keystroke / mouse click commands with AppleScript, if possible.
But now you already have the tools to avoid 90% of the keystrokes and clicks from your original macros.