View Single Post
I've got a great service package, WordService, which is very good at reformatting text that has been copied from another application (say, an email application like Postbox) in to Omni Outliner.

Now--that pasted text has lots of spaces, blank lines, etc., that all need to be removed. The 'Reformat' service in WordService's pack works great. And, I've even assigned it a keyboard command of command/shift/7 (aka command &).

Now--I want to create an applescript that goes through all selected rows and executes the service. However, I am just unable to figure out how to tell OmniOutliner in Applescript how to move from one row to the next within the selection.

Something like:

tell front document of application "OmniOutliner Professional"
repeat for every object of selected rows
tell application "System Events" to keystroke "7" using {command down, shift down}
end repeat
end tell

I'm sure that won't work, however, as I'm not even sure that first 'repeat' command is valid. How would I do this?