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

 
How to make a task nonrepeating? Thread Tools Search this Thread Display Modes
I know that a nonrepeating task returns "missing value" when the repetition field is queried, but how do I specify that a task be nonrepeating? I've tried a number of things, for example

Code:
set repetition of thetask to null
but none of these seem to work. Suggestions?
 
Have you tried 'set repetition of theTask to missing value'?

(Untested.)
__________________
Cheers,

Curt
 
Quote:
Originally Posted by curt.clifton View Post
Have you tried 'set repetition of theTask to missing value'?

(Untested.)
Yes, that worked, thanks!

My original goal was to duplicate a task an then make the duplicate nonrepeatable. However, when I tried this:
Code:
set newTask to duplicate aTask to after aTask with properties {repetition:missing value}
That didn't work, causing me to (incorrectly) give up on using the "missing value" term.
 
Quote:
Originally Posted by scb View Post
Yes, that worked, thanks!

My original goal was to duplicate a task an then make the duplicate nonrepeatable. However, when I tried this:
Code:
set newTask to duplicate aTask to after aTask with properties {repetition:missing value}
That didn't work, causing me to (incorrectly) give up on using the "missing value" term.
scb did you ever get this to work? I would love to use this!
 
Quote:
Originally Posted by skillet View Post
scb did you ever get this to work?
Yes, the code I used successfully is this:

Code:
set newTask to duplicate theTask to after theTask
set repetition of newTask to missing value
 
Do you have an example of the complete script you are using by chance? Also does the script only work if run in Project view?

Check out post 8 by Bill!
http://forums.omnigroup.com/showthread.php?t=22073
 
Quote:
Originally Posted by skillet View Post
Do you have an example of the complete script you are using by chance? Also does the script only work if run in Project view?

Check out post 8 by Bill!
http://forums.omnigroup.com/showthread.php?t=22073
Here's code that will copy a list of selected tasks , or an individual task, to non repeating and remove flags if any. The original task is marked as completed.

It works for me in context and project modes.


Code:
tell application "OmniFocus"
	activate
	tell default document
		set FrontWindow to first document window whose index is 1
		tell FrontWindow
			
			if ((count of leaves of selected trees of content) is 0) then
				set theItems to value of selected trees of content
			else
				set theItems to (value of leaves of selected trees of content) as list
			end if
			
			
			repeat with anItem in theItems
				if (class of anItem) is list then
					repeat with subItem in anItem
						if (class of subItem is task) then
							
							set newitem to duplicate subItem to after subItem
							set repetition of newitem to missing value
							set flagged of newitem to false
							set completed of subItem to true
							
						end if
					end repeat
					
				else if (class of anItem is task) then
					set newitem to duplicate anItem to after anItem
					set repetition of newitem to missing value
					set flagged of newitem to false
					set completed of anItem to true
					
				end if
			end repeat
		end tell
	end tell
end tell
 
This is great, thanks for sharing!

See post 8 in the following link. It might also be of use to someone searching this topic.

http://forums.omnigroup.com/showthre...930#post101930

Last edited by skillet; 2011-09-17 at 05:34 PM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I forward a E-Mail to Omni and you make it a task? Librerio Applying OmniFocus 1 2011-10-30 01:37 AM
Please make a way to tell the difference between projects and task Forecast view! pik80 OmniFocus for iPhone 14 2011-09-08 08:35 PM
Make new task problems gordonworley OmniFocus Extras 1 2009-06-28 06:01 AM
Way to make a daily task only on weekdays? cshumate OmniFocus 1 for Mac 2 2009-01-11 03:06 PM
make new inbox task Jacco OmniFocus Extras 2 2008-02-18 08:12 AM


All times are GMT -8. The time now is 03:25 AM.


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