Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mr. Apple

macrumors newbie
Original poster
Dec 15, 2010
3
0
Hello-

I've but a bit of thought (and research) into this with no avail. :(

Basically, I'm trying to detect when a screenshot is taken.

The people over at CloudApp say they do it by monitoring the users screenshot path (com.apple.screenshotpath or whatever) and looking for new files that start with "Screen shot". However, this isn't reliable.

The people over at grab.by wouldn't reveal their secret method, but, a search of their help database reveals "Additionally TinyGrab for Mac will not auto-upload images if 'Spotlight' indexing in OS X is disabled."

Maybe that has something to do with it? I'm not sure. Thanks for your help!

P.S. I'm a total noob at this. Try to take some time dumbing things down :)
 
Doesn't look like it, but just googling around and found this out:

Spotlight Metadata?

Maybe theres some stuff about screenshots in there? Will look into it :D
 
Walla!

Figured it out.

Just monitor the default screenshot folder for new screenshots, and when one pops up, check for the xattr of com.apple.metadata:kMDItemIsScreenCapture.

If it has it, the program recognizes it as a screenshot and does it's thing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.