Page 1 of 1

Applescript for Omnifocus

PostPosted: Mon Nov 27, 2017 3:08 pm
by MacLitze
Hello,

These are my first steps with scripts and I tried to change the script for Omnifocus.
I would like to pass several inputAttributes to Omnifocus. Unfortunately, there are always error messages.
How can I solve this?
I selected two Attributes.
Here is the script:

set theDate to current date
set theTask to inputAttributes

tell application "OmniFocus"
tell front document
set theContext to first flattened context where its name = "Internet Bestellungen"
set theProject to first flattened project where its name = "Erledigen"
tell theProject to make new task with properties {name:theTask, note:inputAttributes, context:theContext}
end tell
end tell

Thanks for any help!!!

Greetings
Kay

Re: Applescript for Omnifocus

PostPosted: Tue Nov 28, 2017 12:27 pm
by Mr_Noodle
inputAttributes is a list. If you are importing two attributes then you need to refer to each item in the list. Search around for a tutorial on how to deal with lists in AppleScript.