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

Adjusting of AppleScript to add project, context and start date Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Thanks Dale. Got it how would I add a file with variable file_name as an attachment? Here's what I've got so far

tell application "Finder" to set file_name to (name of theFile)

tell application "OmniFocus"
set theTask to "Read " & file_name
set dueDate to (current date)
set time of dueDate to 0 + (16 * hours)
set startDate to (current date)
tell default document
set theContext to first flattened context where its name = "Device"
set theFolder to first flattened folder where its name = "Work"
set theProject to first flattened project of theFolder where its name = "Read"
tell theProject to make a new task with properties {name:theTask, context:theContext, due date:dueDate, start date:startDate, estimated minutes:"15"}
end tell
end tell

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

All times are GMT -8. The time now is 12:54 PM.

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