The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Scripting repetition interval (http://forums.omnigroup.com/showthread.php?t=19277)

teobaldo 2010-12-07 03:38 AM

Scripting repetition interval
 
[New user, and working on importing from Mori. Still going uphill, for now.]

The 'repetition' property of a project or task is a record:

[CODE]repetition:{unit:day, fixed:true, steps:11}[/CODE]

There are links to 'repetition interval' in the dictionary, but there's no definition.

I'm unsure about 'fixed'. I think it controls whether the next repeat is calculated from the current value (true=fixed interval - hard recur), or from the completion date (false=not fixed - soft recur).
Correct?

I'm still confused about what this does to the popup in the Inspector's repetition panel. Only 'start again' and 'due again' can have the "from completion" qualifier, but there seems to be no way to control the popup from a script. It appears to always go to 'due again'.
Bit of a bother, as my repeating tasks are mostly of the 'start again' variety.
Is there, maybe, a workaround?

RobTrew 2010-12-07 08:36 AM

Fixed=true : "repeat every ..."
Fixed=false : "Start/Due Again ... after completion"

Unless I am missing something, the applescript library doesn't seem to give us access to the Start again vs Due again distinction ...

(Which is readable in the Sqlite cache, as in the example below)[LIST][*]"~1(s)w" for Start Again in one week, versus[*]"~1w" for Due Again in one week, and[*]"@1w" for Repeat every week.[/LIST]
[COLOR="White"]--[/COLOR]

teobaldo 2010-12-07 09:57 AM

[QUOTE]Fixed=true : "repeat every ..."
Fixed=false : "Start/Due Again ... after completion"

Unless I am missing something, the applescript library doesn't seem to give us access to the Start again vs Due again distinction ...[/QUOTE]Ah. Confirmed.
[QUOTE]
(Which is readable in the Sqlite cache, as in the example below)[LIST][*]"~1(s)w" for Start Again in one week, versus[*]"~1w" for Due Again in one week, and[*]"@1w" for Repeat every week.[/LIST][/QUOTE]
Mmm. Readable is good. Settable is better. Feature request?

I think I'll have the script set the flag on repeating tasks when importing, so I'll know which ones to visit afterwards.

Thanks, Rob.

RobTrew 2010-12-07 12:29 PM

[QUOTE=teobaldo;90084]Feature request?[/QUOTE]

I think it would be worth signalling through:
[INDENT]OmniFocus > Help > Send Feedback ...[/INDENT]
that there is a gap in Applescript access to Action and Project repetition intervals - the choice between:
[INDENT][I]Start again [N intervals] after completion,[/I][/INDENT]and[INDENT][I]Due again [N intervals] after completion,[/I][/INDENT]
Can be read through the Sqlite cache, but is neither readable nor writable through applescript.

[COLOR="White"]--[/COLOR]

Brian 2010-12-07 02:53 PM

Just wanted to let folks know that I filed a bug on this in response to the email that Rob submitted. :-)

teobaldo 2010-12-08 12:09 AM

You people are great!

teobaldo 2010-12-08 10:47 AM

In addition, [FONT="Verdana"][B]review interval[/B][/FONT] is also a [FONT="Verdana"]repetition interval[/FONT]. But the 'fixed' property is meaningless here: this is always a fixed interval - at least, it is shown as such in the Inspector.

skillet 2011-07-25 10:18 AM

I am confused so how would you set an action to not repeat if it was already set to repeat?

[CODE]
tell application "OmniFocus"
Fixed=false
Start/Due Again 0 after completion
end tell[/CODE]

I am trying to run a script that marks an action as in progress by duplicating the action. Actions that repeat end up showing up twice as a result of the repeat so I am hoping to turn off that off on the action when running the script.

teobaldo 2011-07-26 12:03 AM

Not an actual answer, but you could ask a non-repeating action for its properties, and look for 'repetition interval' to find out how to set this.
Worst case: there isn't one, and you'll have to create the duplicate as a new task, using the properties of the original minus the interval.

teobaldo 2011-07-26 12:44 AM

Ah, yes. For a non-repeating task, it's [I]repetition:missing value[/I].
So just duplicate the task, then set its repetition to [I]missing value[/I]


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

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