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 {"com.apple.application"}
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?
How do I add the app password property? If I do it like above (without pipes) I get an Apple Event Error (AEPrint: [0x0,47a47a "SD Notary"]). If I remove app password, it works, but the name of the keychain entry is the default, which I don’t want to change inside SD Notary.
set newDoc to make new document with properties {allow events:true, Apple ID:"my@mail.com", active identity:"My ID", app password:"MY_PASSWORD"}
When I run this I get a type 6 error. No idea what that is.
tell application "SD Notary"
try
set newDoc to make new document with properties {allow events:true, Apple ID:"my@mail.com", active identity:"My ID", app password:"MY_PASSWORD"}
on error errText number errNum
display dialog (errNum as text) & return & errText
end try
end tell