The Omni Group Forums

The Omni Group Forums (
-   Applying OmniFocus (
-   -   Copy multiple tasks all at once, paste one-by-one (

eurobubba 2014-03-09 10:48 AM

Copy multiple tasks all at once, paste one-by-one
I wanted to keep my longer-term planning (roughly from the one-year down to the one-week timeframe) in OmniFocus but try a couple of other, much simpler apps to display a to-do list for the day. The problem was that there was no easy way to import tasks into most of those other apps without copying or retyping them one-by-one. So I wrote a little AppleScript that lets me copy them from OF all at once, then run the script to choose which line I want to paste into the other app. I run it from Butler, but there are a lot of other hotkey utilities that can do the job just as well. I thought some of you here might also find it useful:

[CODE]tell application "System Events"
set frontApp to (file of first process whose frontmost is true) as text

set clipRecord to (the clipboard as record)
set fullClipText to (the clipboard as text)
set myChoice to (choose from list (paragraphs of fullClipText))
on error
set myChoice to false
end try
end tell

tell application frontApp
if myChoice is not false then
set the clipboard to (myChoice as text)
tell application "System Events" to keystroke "v" using {command down}
delay 0.1
set the clipboard to clipRecord
end if
end tell

It's not just for OmniFocus by any means you can use it any time you want to copy multiple lines/paragraphs of text at once and paste them one-by-one, for example when entering contact data into a web form. Thanks to Chris Stone and Yvan Koenig over at [email][/email] for some optimizations.

All times are GMT -8. The time now is 06:09 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.