MarsEdit Action?

Many thanks you for this. I thought that AppleScript might be the answer, but my understanding is sketchy at best. I was doing my best to educate myself in scripting so that I could attempt to write one. Now I will try and learn from this script.

David.