Auto-highlight past dates?
I have OO3. Is there a way to highlight dates in an outline dynamically (automatically) that are earlier than the current date? In other words, highlight dates that are in the past?
I have three columns in several of my OO3 task lists, and the third column is a "due date." I would like to make the text in that column red if the date is in the past. |
No, this is *not* an ability OmniOutliner has. You could use an AppleScript to do it though. This might be something possible in a future release.
|
[QUOTE=DerekM]No, this is an ability OmniOutliner has. You could use an AppleScript to do it though. This might be something possible in a future release.[/QUOTE]
I'll assume from the context that you mean this is NOT an ability OO has. Take my vote for adding this feature to a future version. In the meantime, I shall see about an AppleScript solution.... |
I know this is an older thread but here is the script that I cam up with to solve this problem. I am open to any ideas for improvement:
repeat with theRow in (every row whose state is unchecked) set theDate to value of cell "Due Date" of theRow if theDate is not missing value then remove every named style of style of theRow from named styles of style of theRow set myStyle to named style ("Overdue") if theDate < TodaysDate then add myStyle to named styles of style of theRow else remove myStyle from named styles of style of theRow end if else -- missing value but unchecked (means I forgot to set a date) remove every named style of style of theRow from named styles of style of theRow set myStyle to named style ("Blankdue") add myStyle to named styles of style of theRow end if end repeat |
I'm curious...why do you remove all the existing styles before adding the Overdue or Blankdue style?
|
Mostly because I don't know what I'm doing :)
As I recall I was getting a error message without it being in there. Is there a better way. |
Hmmm....you're right. It does give an "NSInternalScriptError". Looks like that happens because the style you're trying to add is already in the styles for that row. I'm pretty sure that's an AppleScript limitation, but we do have an open bug for it.
As long as there's no other style info you need to keep, just throwing them all away is probably a reasonable shortcut. To really work around this issue, you'd want to check if the style you're about to apply is already in the list, and if so, don't reapply it. You'd also need to take out the style that's no longer true. So yeah, lots more complicated. Nice shortcut! |
[QUOTE=Lizard]
To really work around this issue, you'd want to check if the style you're about to apply is already in the list, and if so, don't reapply it. You'd also need to take out the style that's no longer true. So yeah, lots more complicated. Nice shortcut![/QUOTE] Just got lucky, sometimes brute force is easier. Thanks though. |
All times are GMT -8. The time now is 04:10 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.