AppleScript名:Keynote書類からPDF書き出し v2 |
— Created 2017-01-21 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set tmpPath to (path to desktop) as string set aRes to exportKeynoteDocToPDF(tmpPath) –Keynote書類からPDF書き出し on exportKeynoteDocToPDF(targFolderPath as string) tell application "Keynote" set dCount to count every document if dCount = 0 then return false end if set aPath to file of document 1 end tell set curPath to (current application’s NSString’s stringWithString:(POSIX path of aPath))’s lastPathComponent()’s stringByDeletingPathExtension()’s stringByAppendingString:".pdf" set outPath to (targFolderPath & curPath) tell application "Keynote" set anOpt to {class:export options, export style:IndividualSlides, all stages:false, skipped slides:true, PDF image quality:Best} export document 1 to file outPath as PDF with properties anOpt end tell return (outPath as alias) end exportKeynoteDocToPDF |
More from my site
(Visited 40 times, 1 visits today)