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 > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Today's Posts

 
Adding Project and Context Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Quote:
Originally Posted by roontoon View Post
Thank you for your response, and yes I have done MUCH reading both on the net and here and the OmniFocus applescript dictionary. While scripting may come easy to you for many including myself it is sometimes a struggle so your remark above was pretty much unwarranted. While it is very apparent that you are very knowledgeable with OF and apple scripting it is not apparent why you would want to diminish someone who is trying to learn something that you have mastered. Remember to teach is to be humble and patient. If you have a problem with me or my question that escapes me as to what it would be.
Feeling better now that you've bitten the hand trying to feed you? :)

As for the teaching philosophy, I've found that people who are anything but humble and patient also can be quite effective teachers. Someone else can only make you feel as badly about yourself as you let them. If there's a way to interpret a remark that makes you feel badly, and a way that doesn't, assume it was meant to be the latter and move on. If Rob got enjoyment out of ridiculing the scripting skills of others on the forum, he could be doing so all the time, and yet all we seem to have is this post.
Quote:
But as I have said in my last post the script I have so far does everything I want except enter the project and context. The reason something like set (project name of theTask) to newprojectName does not work escapes me.
It also pretty apparent that Omni needs to create a suite of scripts that demonstrates how scripting in all of it's facets works with OmniFocus.
Some of this that you are struggling with is just coming to grips with the language, and teaching that isn't really their responsibility, in my opinion.

There is an example of the use of parse tasks hidden away in the OmniFocus application bundle. Select the application in the Finder, choose Show Package Contents from the gear menu, open the Contents folder, then the Resources folder, then MailAction.applescript.

Here is a working example:
Code:
property myProject : "Build giant robot"
property myContext : "Lair of doom"

tell application "OmniFocus"
	tell front document
		set myActionText to "Draft plans"
		set myActionText to myActionText & ">" & myProject & "@" & myContext & "#today #+3d"
		parse tasks with transport text myActionText
	end tell
end tell
and the result:

 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding actions for a context but getting the wrong project gokubi OmniFocus for iPhone 3 2011-07-07 06:56 AM
Adding start date to project removes actions from Context view HSstudio OmniFocus 1 for Mac 5 2010-07-19 03:46 PM
Adding item with no context wmeleis@westernfog.com OmniFocus for iPhone 8 2009-03-29 10:02 AM
Adding New Context on 1.1 denrael OmniFocus 1 for Mac 6 2008-08-04 12:45 PM
Adding Sub-Context by typing gotung OmniFocus 1 for Mac 2 2008-08-04 08:22 AM


All times are GMT -8. The time now is 01:32 AM.


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