View Single Post
Quote:
Originally Posted by Shotster View Post
You apparently forgot to remove/comment out the line that reads "return newTaskList" (which was presumably there for debugging purposes). I eliminated that line and it works.

-Steve
You hit the nail on the head.

OK, OK, due to, well, not "overwhelming demand," but at least a few inquiries, and a certain amount of trying-to-avoid-other-things on my part, here is a 2.0 version of the script, with rather a lot of changes.

First of all, I fixed the aforementioned bug. {wink} Also, I have riddled it with comments. For example, somebody asked uku "Do you know if there's a way to edit this script so that the to-do does NOT contain the note and URL? I just want those fields to be left blank." It should be quite easy for anybody who wants the script to do less than it currently does to just double-click the script icon, and delete the parts that do what they don't want to have happen.

I added the second half of the code for multiple items. So, if you option-click to select multiple tasks in an OF window, then run the script, all the selected tasks will be copied to iCal.

If there are NO tasks selected when you run the script, then it will instead become the "Flagged to iCal" script, copying all flagged tasks in OF into iCal. Well, it will specifically get all tasks that are flagged, are not blocked, and are not completed.

And I've also bundled in a bonus script, called "OmniFocus Script Installer." While "tasks to iCal 2.0" has been saved as a regular script, the Script Installer is an applet. When you double click it, it will copy all script files (specifically, all files that have an extension of .scpt) that are in the same folder over to the appropriate folder for appearing in the scripting menu. (It copies the files to ~/Library/Scripts/Applications/OmniFocus, or to be very specific, to the 'OmniFocus' folder of the 'Applications' folder of the scripting folder in the user's domain, wherever that happens to be.) This little applet also switches on the scripting menu in the menu bar.

If anybody finds any more bugs or problems, go ahead and post them. I'll probably get them fixed and a revised version up here in, oh, another 14 months. :eek:
Attached Files
File Type: zip tasks to iCal 2.0.zip (28.9 KB, 208 views)