Auto-launch the Info Sheet after a screenshot is captured? (by way of script, automation or app etc?)

I use the command+shift+4 feature constantly for genealogy research, and have this problem whereby I forget where I took the picture from. To fix this, I'd love it if the Info Sheet could launch immediately after taking the screenshot, so as to remind me to manually cut-paste the URL I took the image from into the comments box within Info Sheet. Any suggestions on how best to do this would be terrific. Thanks in advance!

edit: added "shift" above and clarified wording for intended use (cut-and-paste text into comments box). All this is is a self-reminder for me, by displaying Info Sheet automatically after screenshots are captured -- if this can be done at all.


Solution 1:

It takes a few seconds to do its thing, but you can use a folder action.

If you are using Mojave or later, a destination folder for the screenshots can be set by using the Options menu of the Screenshot.app.

Create a folder action document in Automator, setting it to receive files added to the screenshot folder, and add a Run AppleScript action:

on run {input, parameters}
    repeat with anItem in the input
        tell application "Finder"
            activate
            open information window of anItem
        and tell
    end repeat

    return input
end run