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 > OmniPlan > OmniPlan General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript Help: getting a list of tasks Thread Tools Search this Thread Display Modes
I'm have some trouble iterating over all tasks/resources in a project. Could somebody give me a snippet or two?

What I'm trying to do is to keep a bug database & OmniPlan in sync with each other. In order to do this, I need to be able to iterate over the list of project tasks that correspond to the bug tickets in order to update status/effort/estimates.

Thanks,

Tom
 
This script does the iteration you're looking for. I'm not really doing anything with the results, so if you run this in Script Editor or something, the result will just be the name of the last resource.

I might imagine that some of your tasks will have a bug ticket number in custom data that you can use to match things up. Is this enough to get you started?

Code:
tell application "OmniPlan"
	tell front document
		repeat with MyTask in every task
			name of MyTask
			duration of MyTask
			custom data of MyTask
		end repeat
		repeat with MyResource in every resource
			name of MyResource
		end repeat
	end tell
end tell
 
Tom's right --- IF you've somehow managed to get your hands on an unauthorized pre-beta copy of OmniPlan 1.1. We're hard at work on improving the AppleScript support in version 1.1. There's enough changes coming in this department that I feel obligated to warn you that there's a good chance your 1.0 scripts won't work with 1.1.

However, if you still really want this script for 1.0, it is possible. "every task" in 1.0 only gives you the top-level tasks, so you'll have to recursively ask each task you find for its children also.
 
Quote:
Originally Posted by Lizard
Tom's right --- IF you've somehow managed to get your hands on an unauthorized pre-beta copy of OmniPlan 1.1.
I was about to be all sheepish and say something about how "this is why developer's don't speak in public". But actually I tried this script with our released 1.0 v121.1 and it works just fine.

It's true, we are already hard at work improving support, but I'm pretty sure we already have this much. :o

-Tom
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
questions on point list in AppleScript roosterboy AppleScripting Omni Apps 0 2010-07-18 04:32 PM
AppleScript: Transfer tasks from THL (The Hit List) to OmniFocus eatmytag OmniFocus Extras 7 2009-11-01 01:59 AM
[REQ] import adblock list via AppleScript frex OmniWeb Feature Requests 1 2009-06-01 11:05 AM
AppleScript support wish list philb OmniWeb Feature Requests 0 2008-02-16 01:24 PM
Applescript error: reading the property list of non-inbox tasks RobTrew OmniFocus Extras 1 2008-01-13 11:33 PM


All times are GMT -8. The time now is 12:55 AM.


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