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 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
AppleScript to change task dates Thread Tools Search this Thread Display Modes
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
 
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
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change date for task started before today? [A: Remove constraint in Task:Schedule inspector] chaloum OmniPlan General 11 2013-07-05 12:23 PM
is there way to change review dates? johnsonloring OmniFocus for iPad 3 2013-02-15 11:52 AM
Applescript to change the Project of a task? Kha OmniFocus Extras 2 2011-12-19 02:10 PM
Can't change the start & End dates tarekag OmniPlan General 2 2011-08-04 08:55 AM
change parent child task relationship with AppleScript cope360 OmniPlan Extras 2 2009-07-16 10:51 AM


All times are GMT -8. The time now is 04:05 PM.


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