The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Verify Next Actions Exist (http://forums.omnigroup.com/showthread.php?t=4089)

SpiralOcean 2007-07-09 08:46 PM

1 Attachment(s)
I got burned today...

[QUOTE=rant]
I was merrily cranking my widgets... (actions)... when I had a strange thought of... why am I not working on Project A?

Turns out, the next action of project A did not have a context and was not showing up in my lists.

This is such an important thing for OmniFocus to Fix! It's insane that there isn't a way to see all unassigned contexts. Almost as insane as not being able to see all projects without next actions. ;)

The goal of GTD... is to do all the thinking first, so when I sit down to a list I am not thinking the following thoughts:
do I have the correct tools,
am I at the right place,
do I have enough time
is this the next action I need to work on for this project.

If the thinking is done, then when a person is processing actions in contexts, (or cranking widgets as David calls it) they are not thinking about whether they are seeing everything they should be seeing.

If they doubt that they may not be seeing everything in their current context, or if they doubt that they are not working on what is most important at the time, then they loose trust in the system and will put the software on a dusty shelf never to return to it again!
[/quote]

To solve this problem I modified your script. The recursion in it is quite impressive... I must say I learned a couple things by going through it.

But the script doesn't go over every task.

I added a small part beginning at line 127...

It scans all uncompleted tasks in the node, and if there is no context, it will add a note saying... "NoContext". This will allow me to perform a search on all NoContext items so I can assign a context.

If you add this to your current script, would you consider taking Growl out? I find it intrusive and don't want to leave it installed. If not, no worries, I'll install Growl so I can open the script to remove the Growl scripting. :o

One more thought... and let me preface by first bowing to your programming knowledge... that may sound sarcastic, but I assure you it is not.

The efficiency of this code is brilliant... but I wonder if it is accessing objects too much and you are loosing some speed from it?

One example...
set theSections to every section
is basically loading the entire outline into AppleScript.

If you reference the ID of the object, you won't load the entire object into AppleScript, but just a string, and can then access the OF object. It may speed things up a bit.

One way I have done this in the past is...
set taskListIDs to id of tasks of selectedTask
set taskCount to count (taskListIDs)

--Go through all tasks
repeat with iTask from 1 to taskCount
--get current task & attributes
set currentTask to task id (item iTask of taskListIDs) of (document documentID)
complete currentTask
end repeat


It may be more work than it's worth... especially if OF is going to fix these things. I've attempted to modify your recursion using ID's... and well... you use some incredibly efficient recursion! :)

Again... thank you for the script. It is extremely helpful!

SpiralOcean 2007-07-09 08:58 PM

I just realized... if there is already a note in the action, there needs to be a return feed added before the tag. Otherwise, the tag runs into the current note.

You may have done this already in the newest version.

jasong 2007-07-09 10:09 PM

Hi Curt,

Nie job on the script. I'm find it useful. Alas I'm not very good about adding NAs to my projects, and as a result, I find a large number of projects getting reported, so many that the dialog box grows to beyond the size of the screen! This cuts of the OK button. Fortunately it's set as the default, so hitting Return was fine, but perhaps you can limit to displaying status (e.g. "25 Projects found with no Next Actions")?

I'm on a 13" MacBook, btw.

SpiralOcean 2007-07-10 05:20 AM

[QUOTE=jasong]Hi Curt,

Nie job on the script. I'm find it useful. Alas I'm not very good about adding NAs to my projects, and as a result, I find a large number of projects getting reported, so many that the dialog box grows to beyond the size of the screen! This cuts of the OK button. Fortunately it's set as the default, so hitting Return was fine, but perhaps you can limit to displaying status (e.g. "25 Projects found with no Next Actions")?

I'm on a 13" MacBook, btw.[/QUOTE]

Have you attempted searching for "Missing NA" after the script has run?

jasong 2007-07-10 11:15 AM

[QUOTE=SpiralOcean]Have you attempted searching for "Missing NA" after the script has run?[/QUOTE]

I'm not sure how that helps me, unfortunately.

The problem is that the AppleScript dialog box that displays which items are missing NAs is so long that the OK button is off-screen and can't be clicked.

SpiralOcean 2007-07-10 04:08 PM

Here is why I thought it helped you.

The reason you want to see all your projects in the dialog window is either:
1. You want to write them down so you can look them up after you hit the Drat button on the dialog box.
2. You want to see the projects so you can memorize them to look them up after you hit the Drat button.

If you use the search field in the top right corner of OmniFocus, and search for Missing NA, you will get all the projects that were found to have a missing next actions. (make sure the projects folder is highlighted before you perform your search)

Thus negating the need to see all of them in the Dialog box.

Let me know if this addressed your question.

Thank you.

SpiralOcean 2007-07-10 04:17 PM

[QUOTE=jasong]I'm not sure how that helps me, unfortunately.

The problem is that the AppleScript dialog box that displays which items are missing NAs is so long that the OK button is off-screen and can't be clicked.[/QUOTE]

I think I just understood your problem... good thing the button is the default. :rolleyes:

curt.clifton 2007-07-10 06:23 PM

[QUOTE=SpiralOcean]
If you add this to your current script, would you consider taking Growl out? I find it intrusive and don't want to leave it installed. If not, no worries, I'll install Growl so I can open the script to remove the Growl scripting. :o
[/QUOTE]

I happen to like Growl and so am unlikely to remove it. I might consider adding code that detects whether Growl is installed instead of always using it. Note that you can use the Growl System Preference Pane to disable Growl notifications.

[QUOTE=SpiralOcean]One more thought... and let me preface by first bowing to your programming knowledge... that may sound sarcastic, but I assure you it is not.

The efficiency of this code is brilliant... but I wonder if it is accessing objects too much and you are loosing some speed from it?

One example...
set theSections to every section
is basically loading the entire outline into AppleScript.
[/QUOTE]

Thanks for your kind words.

As I understand Applescript, the example you give does not load the entire outline. It loads references to every section, which are effectively like IDs. The advantage of doing it this way is that you don't have to ask the program to turn the ID back into an object.

[QUOTE=SpiralOcean]
One way I have done this in the past is...
set taskListIDs to id of tasks of selectedTask
set taskCount to count (taskListIDs)

--Go through all tasks
repeat with iTask from 1 to taskCount
--get current task & attributes
set currentTask to task id (item iTask of taskListIDs) of (document documentID)
complete currentTask
end repeat
[/QUOTE]

You may be thinking of a common Applescript problem where people write things like:

[CODE]
repeat with aTask in every selected task
-- do something with aTask
end
[/CODE]

This is horribly inefficient because the script asks the program for every selected task every time through the loop. The standard solution is something like:

[CODE]
set theTasks to a reference to every selected task
repeat with aTask in theTasks
-- do something with aTask
end
[/CODE]

I might play with my code a bit to see if throwing in the "a reference to" incantation does change the performance. [Edit: Using the "reference to" syntax results in an error when trying to dereference list items.]

curt.clifton 2007-07-10 06:30 PM

[QUOTE=jasong]Hi Curt,

Nie job on the script. I'm find it useful. Alas I'm not very good about adding NAs to my projects, and as a result, I find a large number of projects getting reported, so many that the dialog box grows to beyond the size of the screen! This cuts of the OK button. Fortunately it's set as the default, so hitting Return was fine, but perhaps you can limit to displaying status (e.g. "25 Projects found with no Next Actions")?

I'm on a 13" MacBook, btw.[/QUOTE]

jasong,

Good idea! I've made the change and will post an update shortly.

SpiralOcean 2007-07-10 07:45 PM

[QUOTE=curt.clifton]I happen to like Growl and so am unlikely to remove it. I might consider adding code that detects whether Growl is installed instead of always using it. Note that you can use the Growl System Preference Pane to disable Growl notifications.
[/QUOTE]

It's your world boss... :-)

The frustrating thing about using the applescript to reference the growl dictionary is... it forces a person to install growl to use your applescript. At least, I haven't found a way to load the applescript without running the applescript without having Growl installed so I can delete the code.

For those not versed in Applescript, or using scripts, they may give up when they get the dialog box asking for the Growl dictionary.

Like I said... it's your code... your world.


All times are GMT -8. The time now is 02:13 AM.

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