Detect when screenshots are taken

Discussion in 'Mac Apps and Mac App Store' started by Mr. Apple, Dec 15, 2010.

  1. Mr. Apple macrumors newbie

    Joined:
    Dec 15, 2010
    #1
    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 :)
     
  2. stroked Suspended

    stroked

    Joined:
    May 3, 2010
  3. Mr. Apple thread starter macrumors newbie

    Joined:
    Dec 15, 2010
    #3
    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
     
  4. Mr. Apple thread starter macrumors newbie

    Joined:
    Dec 15, 2010
    #4
    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.
     

Share This Page