I think that could be done like this:
Macro 1.kmmacros (5.2 KB)
For more information, see the wiki Searching the Forum for Answers section.