Yesterday I created this AppleScript which runs from Hazel that takes a text file with 2 lines, first the name of the webpage and the second line is the URL, then creates a PDF in DEVONthink from that URL with the correct name.
I am wondering if there is a way to set the name based on the URL that is already being passed?
Thanks for any input and suggestions.
try
set theFile to "Macintosh HD:Users:jcsullivan2:Library:Mobile Documents:iCloud~com~agiletortoise~Drafts5:Documents:Desktop:URL2PDF.txt"
set paragraph_list to read file theFile using delimiter linefeed
set theName to item 1 of paragraph_list
set theURL to item 2 of paragraph_list
tell application id "DNtp"
set theRecord to create PDF document from theURL name theName pagination no
end tell
end try