View Single Post
Hi, I am totally new to scripting - thus far all I want to be able to do is create a new task from Filemaker Pro into Omnifocus - I have a script that does this.

The snippet which makes the new tasks is below - obviously I substitute variables in place of the hard coded strings.

BUT, how do I get the ID of this newly created task so I can store it in a variable? I have tried set myTaskID to id of task as a command directly after the make new inbox task but this fails --- I have tried what seems like 100 other variations.

tell application "OmniFocus"
tell the first document
make new inbox task with properties {name:"test", note:"test 2", flagged:true}
end tell
end tell


Could anyone help an idiot?!

Thank you