Hi VikingOSX. (Are you Norwegian? If so, I am too...)
I have the same problem with Combine PDF dying because of Python going away, and I really think your script can be my solution too, but I need set the list of known pdf filenames (paths) in my order. (The PDF-files will be in a folder with all kinds of different files...)
I'm not any good in AppleScript, and this is the best I have soo far;
# tilde path to absolute path
set merged_pdf to (NSString's stringWithString:"~/Desktop/merged.pdf")'s stringByStandardizingPath()
# me trying to hardcode the list the 3 PDFs I want to merge. Where the _p1.pdf is page 1
set pdfList to {"~/Desktop/PreAdvise_200436_p1.pdf", "~/Desktop/PreAdvise_200436_a1.pdf", "~/Desktop/PreAdvise_200436_a2.pdf"}
set outurl to NSURL's fileURLWithPath:(POSIX path of (item 1 of pdfList))
set outpdf to PDFDocument's alloc()'s initWithURL:outurl
set pdfList to rest of pdfList
set lastPage to outpdf's pageCount()
but this gives me this error at pageCount:
error "missing value doesn’t understand the “pageCount” message." number -1708 from missing value
So I guess I'm way off in manually setting "pdfList" with my list of paths to get something AppleScripts understands.
If you know how I should format the "set pdfList to"-line to x number of paths to known PDFs - so the rest of your script understand - I would appreciate that very much.