View Single Post
If you're munging the script I think you are, replacing OPSelected() with the following code should change its behavior to send all tasks if none are selected, otherwise only the selected ones:

Code:
on OPSelected()
	tell application "OmniPlan"
		tell front window
			if (count of selected tasks) > 0 then
				set lstOPTasks to selected tasks
			else
				set lstOPTasks to (every child task)
			end if
			if (count of lstOPTasks) > 0 then
				return my Tasks2NameList(lstOPTasks)
			else
				return {}
			end if
		end tell
	end tell
end OPSelected