How to call SD Notary from AppleScript

I’m trying to run SD Notary via AppleScript, but I’m failing at the most basic thing of creating a document.

This is what I do:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

set the_app to choose file with prompt "Please select an .app to notarize" of type {""}
set the_settings to {|active identity|:"...", |Apple ID|:"...", |..|:"..."}

tell application "SD Notary"
	--ERROR (translated) can't be converted to type properties of document
	set the_doc to make new document with properties the_settings
	set resultFile to submit app the_doc at the_app
end tell

I feel a bit of a n00b, sorry… What is wrong here?

You can’t define any app’s properties outside a tell block like that (unless you use «class wxyz» style notation).

Hmm, I’m stil sure I’m missing something, because I get the same error with this:

tell application "SD Notary"
	set the_settings2 to make new document with properties ¬
           {|active identity|:"...", |Apple ID|:"..."}
end tell

Get rid of the pipes — they’re forcing the app’s terminology to be ignored, which is exactly what you don’t want.

Ah, right! What put me off was the Dictionary of SD Notary. From the Standard Suite:

set theResult to make new type class ¬
     with properties record

I still find reading dictionaries a bit troubling…

But a big thanks nonetheless!