I am trying to create a macro to monitor a folder and open any new markdown file or old markdown file whose contents have changed.
Using old posts and some youtube videos, I have been able to create a macro to watch a folder for a particular type of file.
I have a folder of markdown files which I create using a particular app, Highlights.
Is it possible to have the macro open any new or updated files in the folder?
I wouldn’t use keyboard maestro. Take a look at hazel. It’s excellent and you can run your kb maestro scripts through it. http://www.noodlesoft.com/hazel.php
Hazel is an awesome program that does a stack of things really well.
However do note that version 7 adds a Folder Changed trigger that can tell you when a file is added or removed from a folder, so for simple cases Keyboard Maestro may be able to sort you out.
Hazel has way more power in this area though, and similarly to TextExpander, if you have heavy needs they are definitely great companions to Keyboard Maestro.
Thanks. I have been waiting for this . I want to create a simple macro to alert me when new files are added to my download folder and open the folder, highlighting the new files. How do I go about it?
It is not the Reveal files that has changed, it is the token %TriggerValue%, which used to return only the file name. Now, as you have learned, it returns the full POSIX path.
Hey, everyone. I found this thread while trying to build the exact macro Peter shared above to reveal my screenshots folder after a new screenshot is added.
I built the macro, and it works, but I think I've run into a bug because it only works once, and then stops working and crashes KM. I'm not sure if it's because my folder is Dropbox (I saw another thread mentioning that was a potential issue with the Folder trigger).
What happens, more specifically, is that after the first successful run, nothing appears to happen when it should be triggering again. When I open KM after it has failed a few times, I get a message that KM has crashed and can submit a report. It happens consistently and repeatedly.
Hey there, that is very odd to me, as I have a similar macro that works without fail every time, albeit not in a Dropbox folder. There’s nothing wrong with the macro that I can see; I mean it’s about as basic as a macro can be so there’s not much that can go wrong with it haha. Hopefully (likely), somebody far wise than me will chime in soon with more insight.
You might also consider either reaching out through the help menu in KM itself (since it is crashing) and/or starting a new thread as this is deviating slightly from the original topic.
It would be in the ~/Library/Logs/DiagnosticReports folder
You can get to ~/Library (which is in your Home folder, but generally hidden from you) in the Finder by holding down the shift (or option) key and selecting Library from the Go menu in the Finder.
Keyboard Maestro will generally send the crash reports to me if you've allowed it, and if you have included your email address then I can chase it up with you, but having the actual cause is often very helpful.