The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
Paste any lines in Clipboard as new tasks Thread Tools Search this Thread Display Modes
thanks and BTW Ical is free...!
any idea to get a better search, by applescript?
e.g. search all the occurrences of the word book in the title AND of the word music in the note description... both for todo and events!

amelchi
 
Hello RobTrew,

where is your original script?

thanks

amelchi
 
Good question.

It probably looked sth like this:
Code:
try
	set lstLines to paragraphs of (Unicode text of (the clipboard as record))
on error
	tell application id "sevs"
		activate
		display alert "No text lines in clipboard"
	end tell
	return
end try

set lngLines to length of lstLines
if lngLines < 1 then return

tell application id "OFOC"
	activate
	tell front document window of front document
		repeat with oPanel in {content, sidebar}
			set lstTrees to (selected trees of oPanel where class of its value ≠ item and class of its value ≠ folder and class of its value ≠ context)
			set lngTrees to count of lstTrees
			if lngTrees > 0 then exit repeat
		end repeat
		if lngTrees < 1 then return
		set oTree to first item of lstTrees
		set oParent to value of oTree
		tell oParent
			repeat with oLine in lstLines
				make new task with properties {name:oLine}
			end repeat
		end tell
	end tell
	
	tell oPanel to set expanded of oTree to true
end tell
 
thanks

but it doesn't seem to work...
 
Quote:
Originally Posted by amelchi View Post
it doesn't seem to work...
:-)

How are you using it ?
 
A service version.

Unzip and dbl-click to launch Automator,
then Save As to the service name required.

Faster in the sense that text only has to be selected (using the script it needs to be copied), but executes a little slowly (particularly the first time it is used).

(Does use Growl, if installed, to report results)

( but personally, I just use cut and paste :-)
Attached Files
File Type: zip Add lines to OmniFocus as tasks.workflow.zip (59.8 KB, 486 views)
 
thanks,

it gives this error on the very first line
"error "" number -1721"

amelchi
 
Quote:
Originally Posted by amelchi View Post
it gives this error on the very first line
"error "" number -1721"
OmniFocus has built-in support for pasting multiple lines of text as separate tasks: you don't need to use this script. Just click on a row handle next to wherever you'd like your new tasks to show up, then use Paste (Command-V).
 
that I know Ken, thanks...
but sometimes a script is useful!

Rob
in automator no errors but nothing happens, nor Growl notification!

thanks again
amelchi
 
Quote:
Originally Posted by Ken Case View Post
OmniFocus has built-in support for pasting multiple lines of text as separate tasks: you don't need to use this script. Just click on a row handle next to wherever you'd like your new tasks to show up, then use Paste (Command-V).
True, but the goal of this script was to paste them in nested under an existing task or project. Admittedly, Paste followed by Indent does the same (for the action case), but if one wanted to harvest a bunch of rows from different emails (picking out action items from meeting minutes, perhaps), installing such a script in the source application, or using Rob's service version, would allow a more streamlined workflow than constantly flipping back and forth between OmniFocus and the other app. Clip-o-Tron and clipping aren't really what the productivity doctor ordered in that case.
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Lines from Thunderbird/Mail as tasks chiborg OmniFocus 1 for Mac 1 2012-04-26 10:04 AM
Applescript to Save Clipboard to Clippings? jamespro OmniOutliner 3 for Mac 0 2011-03-23 12:11 PM
Applescript to Paste from Clipboard richgoidel OmniFocus Extras 2 2010-12-13 04:00 PM
Copy Actions and/or Projects to Clipboard carlsson OmniFocus 1 for Mac 3 2010-05-31 01:27 AM
Open Tab with URL in clipboard eps5 OmniWeb Feature Requests 2 2008-11-10 07:40 PM


All times are GMT -8. The time now is 09:52 AM.


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