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

 
Auto-Flag by Context Thread Tools Search this Thread Display Modes
Hello, I have setup my omnifocus workflow where I use context as a priority level, so I use High, Medium and low Priority context. What I want to know is if there is an apple-script that can automatically flag all the action sthat use the context High Priority or maybe that all items that I flag automatically get that context.

I believe that could be useful as I have setup my iOS devices to use the icon badge for flagged items so every time I have a high priority item it will be represented on my home screen.

Thanks
 
The simplest script might look something like this:

Code:
tell application id "OFOC"
	tell default document
		set flagged of flattened tasks where name of its context contains "high" to true
	end tell
end tell
 
or, going in the other direction which you mention:

Code:
tell application id "OFOC"
	tell default document
		set oContext to first flattened context where name = "high"
		set context of (flattened tasks where flagged = true) to oContext
	end tell
end tell
 
thank you. One las question how can I keep the script running in the background
 
You can't; you run it periodically, or as needed.
 
and perhaps one way of running it periodically would be with some kind of Hazel rule (as in http://forums.omnigroup.com/showthread.php?t=27370 ).

(perhaps whenever the OF cache changes, but with a few minutes lag, to avoid circularities).
 
I'm planing to convert the script into an aplication and then runing it every x time with lingon3 as a launchd
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request: Disable auto-dim/auto-lock while plugged in awolfe_ii OmniFocus for iPhone 1 2014-01-13 09:55 AM
Mass de-flag in context/perspective script. roadtrip OmniFocus Extras 5 2012-01-26 01:57 PM
auto flag start time. johnrover OmniFocus 1 for Mac 9 2010-11-21 12:29 PM
Auto Context? poritsky OmniFocus 1 for Mac 7 2010-08-09 09:18 PM
Auto layout is an auto outline disaster bross OmniGraffle General 0 2007-04-16 10:59 AM


All times are GMT -8. The time now is 11:43 AM.


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