Estoy intentando automatizar el archivo de recibos electrónicos en una aplicación de archivo digital llamada Paperless de Mariner Software .
Dentro del diccionario Paperless AppleScript, se define lo siguiente para un recibo (clase/tipo de datos):
receipt n \[inh. library item\] : A receipt. elements contained by . properties merchant (text) : The merchant's name. amount (text) : amount of the receipt (as a string); can include currency symbol tax (text) : tax or VAT of the receipt (as a string); can include currency symbol payment method (text) : method of payment category (text) : category of receipt notes (text) : notes for the receipt date (date) : date of the receipt custom 1 (text) : custom data 1 custom 2 (text) : custom data 2 custom 3 (text) : custom data 3 file (file) : file reference for the receipt responds to add.
En mi AppleScript, intento crear un nuevo recibo con el siguiente código:
set MerchantID to "Apple -- testing"
tell application "Paperless"
activate
add receipt with properties {merchant:MerchantID}
end tell
Sin embargo, falla con el siguiente error:
error "Paperless got an error: Can’t make receipt into type library item." number -1700 from receipt to library item
Lo que me confunde del error es que estoy intentando hacer un recibo que es una clase que hereda del tipo más general artículo de la biblioteca .
¿Puede alguien explicar cómo crear un nuevo artículo basado en clases definidas así?