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 Search Today's Posts Mark Forums Read

 
Paste any lines in Clipboard as new tasks Thread Tools Search this Thread Display Modes
In partial response to a posting under Applescript Requests:

Quote:
I'd like it if I had a list, (as might come from an email)
Like:
1. Please do this
2. Please do that
3. Oh, and this other thing.

I'd like to select the list, hit a button and have three new actions created.
Here is a draft script which appends any lines of text in the clipboard as children of the project or task which is currently selected in Omnifocus.

i.e. you would need to tap CMD-C to capture text lines into the clipboard, and then run this script.

Not outstandingly useful, it has to be said, as Omnifocus does quite a good job of pasting text lines anyway :-)

Last edited by RobTrew; 2011-07-05 at 08:46 AM..
 
I'll give it a try. Thanks very much.
 
That works exactly right. Thanks again.
 
Hello Rob,

would it be possible to use your applescript for Ical?
thanks

amelchi
 
Quote:
Originally Posted by amelchi View Post
would it be possible to use your applescript for Ical?
No - that kind of script is application-specific.

Not quite sure what you are trying to do. Dumping lines from the clipboard into the to do list of the first iCal calendar might look something like the following, but iCal is not really my thing, I'm afraid.

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

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

tell application id "com.apple.iCal"
	activate
	tell first calendar
		repeat with oLine in lstLines
			make new todo with properties {summary:oLine}
		end repeat
		set strCal to name
	end tell
	
	display alert (lngLines as string) & " To Do item(s) added to calendar: " & strCal
end tell
 
thanks a lot... it is just perfect!

amelchi
 
just curious... what do you use as calendar app? on the mac

thanks

amelchi
 
Quote:
Originally Posted by amelchi View Post
what do you use as calendar app?
I do use iCal. I just mean that I've never really needed to look at its applescript library - it's good enough for the simple use I make of it.
 
actually I find the Ical search options too weak... only reason to move on to BusyCal
 
Quote:
Originally Posted by amelchi View Post
only reason to move on to BusyCal
BusyCal certainly looks well designed, but it may not be the best option for scripted integration with OmniFocus.

It does implement the very simple application-independent applescript basics, but unlike iCal it doesn't have its own applescript suite, offering access to the application data.

A script like the one above, for example, could not be written for the current version of BusyCal ...
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 01:51 AM.


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