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 Extras
FAQ Members List Calendar Today's Posts

 
what is the fastest way to search tasks based on custom data in AppleScript Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Thanks for the help Lizard.

I tried your code and it causes an error when the task is not found instead of returning false.

I think this is the ticket:
Code:
-- Finds a Task
--   _id : tracid of task
on findTask(_id)
	tell application "OmniPlan"
		tell first document
			try
				set t to first task whose value of custom data entry "tracid" is _id
			on error errmesg number errn
				if errn is -1719 then
					return false
				else
					error errmesg number errn
				end if
			end try
			return t
		end tell
	end tell
end findTask
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Can custom data be printed jethiele OmniPlan General 5 2012-04-20 10:27 AM
Custom text exports from OmniFocus (applescript-based query language) RobTrew OmniFocus Extras 0 2011-01-14 06:08 AM
Searching custom data edwagner OmniPlan General 1 2010-09-17 09:19 PM
OmniOutliner: Fastest way to set data in rows, columns or blocks? nelsonm AppleScripting Omni Apps 3 2009-07-27 02:45 PM
Setting Task Custom Data using Applescript jubo OmniPlan General 6 2007-08-22 10:05 AM


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


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