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

Need an AppleScript written Thread Tools Search this Thread Display Modes
I need an AppleScript written for my OmniFocus workflow. It's much simpler than the other iCal to OF script listed here. Just some text manipulation.

If there's a scripting Ninja who'd like to volunteer, I'd be grateful. Otherwise, I'd be willing to pay a few bucks or buy someone beer to get it done if I have to.

I want to select a number of iCal events, and have the script convert them into individual OmniFocus actions, setting the Project, Context, Start Date and Due Date. I'd also like some other text manipulations.

Here's how I do it manually now, step by step:

(1) I select iCal events by hand, copy and paste them into OmniFocus' Quick Entry;

(2) Divide the events into separate OmniFocus Actions;

(3) Copy/Paste the Start Time to the left of the title followed by " - "

(4) Copy/Paste the date into Start Date field;

(5) Delete the word "from", then Copy/Paste the Date and Start Time into the Start Date field;

(6) Set the Project and Context (this is constant for all iCal events);

(7) Delete the iCal date information.

So what starts out looking like this:

Ends up like this:

Thanks in advance for helping me or for pointing me in the right direction.
Originally Posted by popcornflix View Post
It's much simpler than the other iCal to OF script listed here. Just some text manipulation.

The first rule of software consultancy is that no client proposal that includes the word just ever turns out to be technically feasible ...

A first problem here is that the iCal Applescript library doesn't let us know which items are selected.

You can of course copy, and then work on the text contents of the clipboard, but then there's quite a lot of messy parsing to be done if you want to deal with dates, locations and other fields.

If you do find a programmer who offers to do this for a beer, or even for $100, you should accept the offer immediately :-)
To Applescript coders:

I didn't mean to be insulting by using the phrase "buy someone beer."

If you have the skills to write this Applescript, please contact me so we can privately discuss your fee.

Last edited by popcornflix; 2012-05-30 at 08:00 AM..
This probably isn't helpful either, but RobTrew is one of the most generous AppleScript coders that I have ever encountered. I use some of his scripts daily for DEVONthink, OmniFocus, and OmniOutliner and all of them were shared at no charge with the online community.

Hopefully someone will be able to assist you with what you are needing.
One way around iCal's reticence re the selection would be to embed the Applescript in a Keyboard Maestro macro which was restricted to iCal and prefaced the script with a Cmd-C.

To quote Tom Lehrer, 'I have a modest example here'

(This draft doesn't attempt to delete the items from iCal best to test a bit before adding that but Keyboard Maestro could handle that part too ...)
Attached Files
File Type: zip (3.2 KB, 2242 views)
Originally Posted by RobTrew View Post
To quote Tom Lehrer, 'I have a modest example here'
Thanks, Rob. That's very generous.

I use QuicKeys instead of KM, so I opened your XML file and copied the AppleScript. When I compiled it in Apple Script Editor it threw a syntax error at line 24:

Expected end of line, etc. but found unknown token.
This is the line:

set strStart to strDate & space & strFro
It highlighted the first semicolon.

Did I mess something up when I copied it from the XML? Text file attached.
Attached Files
File Type: txt RobTrewOmniFocus iCal Ascript.txt (3.1 KB, 1802 views)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript help Shek OmniGraffle General 3 2012-09-04 05:02 AM
Applescript help mojaverat OmniFocus 1 for Mac 1 2011-08-23 04:18 PM
$$ for Applescript Help Hewdini OmniFocus Extras 1 2009-08-14 12:34 PM
Applescript Help ryan_marsh OmniFocus 1 for Mac 3 2008-11-24 09:51 AM
Help with applescript mrpuggles AppleScripting Omni Apps 1 2008-09-16 05:40 PM

All times are GMT -8. The time now is 11:01 AM.

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