View Single Post
FWIW you can get a script of this kind to ensure that the wait context exists by doing something along the lines of:

property pstrWaitContext : "Wait"
property pstrPrefix : "Reply on:"

tell application id "OFOC"
	tell front document
			set oWaitContext to first flattened context where name = pstrWaitContext
		on error
			set oWaitContext to (make new context with properties {name:pstrWaitContext})
		end try
		tell content of front document window
			set dteNew to (current date) + (2 * days)
			repeat with oSeln in (value of selected trees) as list
				duplicate oSeln to after oSeln with properties {name:pstrPrefix & name of oSeln, context:oWaitContext, start date:dteNew, repetition:missing value}
				set completed of oSeln to true
			end repeat
		end tell
	end tell
end tell

Last edited by RobTrew; 2011-06-17 at 09:16 AM.. Reason: Adjusted illustrative code