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

 
Verify Next Actions Exist Thread Tools Search this Thread Display Modes
I got burned today...

Quote:
Originally Posted by 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!
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!
Attached Files
File Type: zip Verify Next Actions Exist missing context.zip (11.3 KB, 267 views)

Last edited by SpiralOcean; 2007-07-09 at 08:53 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.
 
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:
Originally Posted by 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.
Have you attempted searching for "Missing NA" after the script has run?
 
Quote:
Originally Posted by SpiralOcean
Have you attempted searching for "Missing NA" after the script has run?
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.
 
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.
 
Quote:
Originally Posted by 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.
I think I just understood your problem... good thing the button is the default. :rolleyes:
 
Quote:
Originally Posted by 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
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:
Originally Posted by 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.
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:
Originally Posted by 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
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
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
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.]
__________________
Cheers,

Curt

Last edited by curt.clifton; 2007-07-10 at 06:31 PM.. Reason: More data
 
Quote:
Originally Posted by 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.
jasong,

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

Curt
 
Quote:
Originally Posted by 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.
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.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Suggestion: Verify Date Input chmars OmniFocus 1 for Mac 1 2012-08-17 04:14 PM
Send OF item to EverNote (AppleScript exist?) ende OmniFocus 1 for Mac 0 2011-11-08 10:10 AM
easiest way to determine whether enough resources exist for a project Aires OmniPlan General 2 2010-03-22 01:06 PM
Problem with repeat when start date and due date exist SpiralOcean OmniFocus 1 for Mac 2 2008-09-05 04:43 AM
Thanks to exist jiliwi Omni Lounge 1 2006-06-25 10:28 PM


All times are GMT -8. The time now is 10:31 AM.


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