Page 1 of 1

Applescript to add document to Paperless App

PostPosted: Thu Jan 03, 2013 5:24 pm
by scottfwalter
set this_file to theFile
set the_category to "Personal"
set the_title to "My Title"

set theLibraryName to "Paperless Library"
tell application "Finder"
set the_title to name of this_file
set the_date to creation date of this_file

tell application "Paperless"
activate

set theDoc to (the first library whose name is theLibraryName)
tell theDoc
set result to make new document with properties {title:the_title, category:the_category, date:the_date, file:this_file as alias}
--set result to make new receipt with properties {merchant:the_title, date:the_date, file:this_file}
add result without prompting
end tell
end tell
end tell