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

 
Scripting: Using a selected range of tasks Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Fellow OmniFocus users,

I have been trynig to get an AppleScript of mine to work on a selected range of tasks and was able to figure this out yesterday. Therefore, I thought I would share what I did to both share but also to see if anyone else might have a better solution. The script below sets the Start Date of the selected tasks to the current date + 21 days.

Let me know your thoughts - Thanks.

Code:
tell application "OmniFocus"
	tell application "Finder"
		set dateTarget to (current date)
		set day of dateTarget to ((day of dateTarget) + 21)
	end tell
	set taskList to count of the items of the selected tree of the content of document window 1 of document 1
	set taskPtr to 1
	repeat taskList times
		set taskTmp to the value of item taskPtr of the selected tree of the content of document window 1 of document 1
		set start date of taskTmp to dateTarget
		set taskPtr to (taskPtr + 1)
	end repeat
end tell
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting bridge: crash when trying to get child tasks of a task amorya OmniFocus Extras 8 2013-11-10 05:00 AM
Selected Tasks to iCal uku OmniFocus Extras 29 2009-09-22 09:35 AM
Reporting or Listing Tasks by a Date Range? Ciscok1d OmniFocus 1 for Mac 3 2008-10-23 10:07 AM
Get selected tasks with script? curt.clifton OmniFocus 1 for Mac 1 2007-06-10 05:43 PM


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


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