The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   AppleScript to change task dates (http://forums.omnigroup.com/showthread.php?t=7952)

aleding 2008-05-11 01:54 PM

AppleScript to change task dates
 
Hello folks,

I am trying to author a simple AppleScript to change the dates of either a single or selection of tasks.

The following is what I use for OO3 but the same script will not work due to differences in the dictionary and I have not yet been able to figure out the parity set of commands.

All ideas and advice are welcome - thanks.

[CODE]tell application "OmniOutliner Professional"
set taskDate to (current date)
set taskList to selected rows of front document
repeat with theTask in taskList
set value of cell "Start Date" of theTask to taskDate
end repeat
--taskDate
end tell[/CODE]

aleding 2008-05-11 03:16 PM

OK - I got this to work for a single task but would I would like to have it work for a selection of tasks - is this possible?

Also, please let me know if you think the following can be cleaned up and made more efficient.

Thanks.

[CODE]tell application "OmniFocus"
set dateToday to (current date)
set theTask to the value of the first item of the selected tree of the content of document window 1 of document 1
set start date of theTask to dateToday
end tell[/CODE]


All times are GMT -8. The time now is 04:42 AM.

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