Applescript for Omnifocus

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Applescript for Omnifocus 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
MacLitze
 
Posts: 4
Joined: Mon Nov 27, 2017 2:42 pm

Re: Applescript for Omnifocus 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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support