Jump to content
_mk_

OmniFocus Task Actions [Updated to 3.1]

Recommended Posts

I think I'm doing something wrong. I installed the workflow and when I type ".of" I get a list of things to do. If I want to search contexts, I go to .oftc, then it asks me to enter a context, I type the first few letters of the context and my options become Search in Google, Search in Wikipedia, Search in Amazon.

 

What am I doing wrong?

 

Thanks.

 

When using .oftc (OmniFocus Tasks in Context) you have to enter the complete context name. Use .offc (OmniFocus find Context) instead. When you start typing the first letters, you'll get a list of all matching contexts. Select the right one from the list and it will call .oftc with the correct context name.

Share this post


Link to post

Thanks for the quick response, when I use .offc, it can find the context (for instance, Phone along with the number of tasks within that context), says it is "Loading tasks" for a few seconds then the next set of options I see is  Search in Google, Search in Wikipedia, Search in Amazon.

Share this post


Link to post

The fallback web searches appear if no results are returned from the workflow. But when your context says that there are available tasks, they should show up.

 

Could you please try to start the context script in Terminal:

 

./getTasksByContext.sh "Phone"

Do you get any error messages?

 

I'll add some logging with the next release for better support in the future.

Share this post


Link to post

What are the currently available tasks in this context? Does one of them maybe contain any chars other that letters and digits?

Share this post


Link to post

I have some issues with this as well, results are never returned.  

 

If I run the shell script directly, it barfs due to not finding the commands referenced by the script. Environment variable/pathing issue?

 

 

 

$ /Users/emory/Dropbox/Application\ Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 3: workflowHandler.sh: No such file or directory
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 5: getPref: command not found
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 41: getXMLResults: command not found
 

Share this post


Link to post

I have some issues with this as well, results are never returned.  

 

If I run the shell script directly, it barfs due to not finding the commands referenced by the script. Environment variable/pathing issue?

 

 

 

$ /Users/emory/Dropbox/Application\ Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 3: workflowHandler.sh: No such file or directory
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 5: getPref: command not found
/Users/emory/Dropbox/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3/getTasksInInbox.sh: line 41: getXMLResults: command not found
 

 

Could you please try to cd in the workflow directory first before executing the command?

 

cd /Users/emory/Dropbox/Application\ Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3
./getTasksInInbox.sh

Do you still get errors?

Share this post


Link to post

Could you please try to cd in the workflow directory first before executing the command?

 

cd /Users/emory/Dropbox/Application\ Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E1A1A3ED-90BF-4B96-BD56-16B26C7193D3
./getTasksInInbox.sh

Do you still get errors?

 

I do not. I still cannot get results from the workflow, however. e.g. OmniFocus: Show tasks in context I assign to '.ofcs' ('context seek') are sometimes returned and sometimes not, it appears that nested levels of contexts are where it gets confused maybe?  It isn't consistent though.  I also noticed contexts that start with a leading '@' don't get matched, nor do ones that I prefixed with emoji — that may be just be a regex issue though?

 

Since I just threw a half dozen variables into the mix, I can not return a view of context: '@office'/'fw' but I can return a view of context: '{Emoji} Agendas'/'person'

Edited by incumbent

Share this post


Link to post

I do not. I still cannot get results from the workflow, however. e.g. OmniFocus: Show tasks in context I assign to '.ofcs' ('context seek') are sometimes returned and sometimes not, it appears that nested levels of contexts are where it gets confused maybe?  It isn't consistent though.  I also noticed contexts that start with a leading '@' don't get matched, nor do ones that I prefixed with emoji — that may be just be a regex issue though?

 

Since I just threw a half dozen variables into the mix, I can not return a view of context: '@office'/'fw' but I can return a view of context: '{Emoji} Agendas'/'person'

 

Assigning different keywords in the workflow has great potential to break certain functionality. Selecting a project/context/perspective from their searches (.offp, .offc, .offv) will invoke the corresponding .oft* keyword. The same keywords are used for the back functionality of the task details display. So changing the keywords is not a good idea unless you also change all other related scripts.

 

Nested contexts are currently not supported. The workflow will only display tasks that are directly in the searched context. So, parent contexts will not show the tasks of their child contexts. This will be fixed with the next release as I already had to implement the recursion for the folder search.

 

Don't you get any tasks for @ and Emoji contexts don't they even show up in the context search (.offc)?

Share this post


Link to post

Maybe I'm doing something wrong, but when I type .ofti, I think I'm supposed to get a view of my inbox, correct?  Right now, I have 11 tasks in my inbox, but only 3 are showing up with this keyword.

 

Thanks for a great workflow and any guidance you can provide me.

Edited by drking

Share this post


Link to post

Maybe I'm doing something wrong, but when I type .ofti, I think I'm supposed to get a view of my inbox, correct?  Right now, I have 11 tasks in my inbox, but only 3 are showing up with this keyword.

 

Thanks for a great workflow and any guidance you can provide me.

 

Do your missing tasks have a future start date or are they sub-tasks?

Share this post


Link to post

Version 2.4 is available:

 

  • search for folders
  • show tasks in folder
  • use CMD to focus project, context, folder, perspective in OmniFocus instead of showing the tasks
  • bugfixes

Share this post


Link to post

_mk_ THANK YOU!!!!

 

As I mentioned, your workflow was the main reason I came to Alfred from the launchbar.

 

Focus on Project and Focus on Folders are 2 important aspects of how I use omnifocus.

 

I sincerely appreciate your adding these features.

 

Again, thank you.

Share this post


Link to post

_mk_, I wanted to tell you that tried focus on project and focus on folder and both work.

 

I also tried the focus on perspective and that one takes me to the inbox instead of the intended perspective.

Share this post


Link to post

_mk_ actually, it takes me to my inbox perspective....does not matter which perspective I choose on Alfred to focus on, it always goes to this one perspective.

Edited by edwardro

Share this post


Link to post

_mk_ actually, it takes me to my inbox perspective....does not matter which perspective I choose on Alfred to focus on, it always goes to this one perspective.

 

Did you try one of OF's built-in perspectives like Flagged or Projects? It works perfectly for me with all my perspectives.

Share this post


Link to post

Can you send me a screenshot of the settings of one of the non-working ones. Maybe I can reproduce the issue and then fix it.

Share this post


Link to post

Do your missing tasks have a future start date or are they sub-tasks?

_mk_ This morning I completed all my tasks in the Inbox and marked them off.  (they were all regular tasks -- no sub tasks, no dates applied)  So this morning, I started fresh and added 14 tasks to the inbox.  Now, everything works fine -- all my tasks are showing up in Alfred as they should.   It seems like everything is working okay now, but I'll continue to keep an eye out if I run across it again.

Now to update to the latest version I see was posted today....This workflow is super fantastic!

Edited by drking

Share this post


Link to post

I'm using 2.4 of the workflow and I'm still not getting the hang of the matching. I am using everything as-bundled and default:

 

.ofti returns nothing:

 

13%2010:14%20AM.png

 

If I just do .oft I see the options for OmniFocus including Inbox:

 

13%2010:15%20AM.png

 

When I try to view the items in a Project called "Firewall Requests" I get this:

 

13%2010:18%20AM.png

 

 

 

A shot of my Workflow showing the keywords:

 

13%2010:19%20AM.png

Edited by incumbent

Share this post


Link to post

I'm using 2.4 of the workflow and I'm still not getting the hang of the matching. I am using everything as-bundled and default:

 

.ofti returns nothing:

 

13%2010:14%20AM.png

 

If I just do .oft I see the options for OmniFocus including Inbox:

 

13%2010:15%20AM.png

 

When I try to view the items in a Project called "Firewall Requests" I get this:

 

13%2010:18%20AM.png

 

 

 

A shot of my Workflow showing the keywords:

 

13%2010:19%20AM.png

 

Version 2.4 includes debug output now. There should be a log file for every keyword. Could you please have a look inside the workflow folder and check if any of the logs contains error messages?

Share this post


Link to post

No errors, it just returns nothing.

 

 

 

<?xml version='1.0'?><items>
</items>
 

 

Do the tasks have future start dates? drking had a similar problem. Could you try to process your inbox and add new tasks?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...