Help: Smart Group for 'Modified within past n days'

Subject says it all. I can make a DTPO smart group which will include files modified last week, last month, etc. But these use the calendar date, so ‘last month’ might include all the files from the 1st of the month until today.

I want to include all the files I’ve modified within the last 7 days, 30 days, etc. Can I do this? The best I’ve done is files modified since a fixed date – e.g., February 10. But that’s not what I’m looking for.

Thanks,
-Hank

There was a discussion I started on this here:

Can’t be done currently with just smart groups. I have been wanting to write an applescript that puts a special tag on files based on “modified > x days”, then you can use a smart group to filter on that tag. Just haven’t had an opportunity to do it.

Ahh, I see the discussion there now. If you are able to put together an Applescript to do this search, I’d be much appreciative!

Thanks,
-Hankk