AppleScript名:プリント情報にアクセスする |
— Created 2014-11-27 by Takaaki Naganoya — 2014 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "AppKit" set aPrintInfo to current application’s NSPrintInfo’s sharedPrintInfo() set aPaperName to (aPrintInfo’s paperName()) as string –> "iso-a4" set aPaperSize to (aPrintInfo’s paperSize()) as record –> {width:595.0, height:842.0} set aLocPaperName to (aPrintInfo’s localizedPaperName()) as string –> "A4" set anOrientation to (aPrintInfo’s orientation()) as integer –> 0 aPrintInfo’s setPaperName:"iso-a5" set aPaperName to (aPrintInfo’s paperName()) as string –> "iso-a5" set aPaperSize to (aPrintInfo’s paperSize()) as record –> {width:420.0, height:595.0} set aLocPaperName to (aPrintInfo’s localizedPaperName()) as string –> "A5" aPrintInfo’s setOrientation:1 –(0:portrait, 1:landscape) set anOrientation to (aPrintInfo’s orientation()) as integer –> 1 |
More from my site
(Visited 62 times, 1 visits today)