Evenly distribute a dotted outline to create a coupon?

Is there a way to evenly distribute an outline?

I want to create a coupon.  I'd like the hashes of the line to be centered on the corners.  I know the size of the object and the dotted lines will need some changes, is there a way to easily do this?  Is there a Macro for this?

This what I am getting, but I want the result on the right.