Sunday, March 28, 2010

Get preflight Working Profile as AS...

Syntax, syntax, syntax.

I have a list of thirty or so different document sizes maintained in a FileMaker database. It works great to pass variables through to build InDesign files. My designers would also like placeholder Photoshop files, but I'd rather not have them taking up disk space unless the files are absolutely needed. And the specs change often, so I'd like as much as possible to be data driven. So, I'd like to have a script that pulls page height and width and resolution requirements to Photoshop.

I'm having no trouble with the

We use preflight profiles that are named with the proper required image resolution (''72'', ''150'', 300'' etc.) and they are properly embedded in the InDesign file.

Does anyone know the syntax for getting the name of the embedded preflight Working Profile to pass through in a script?

Thanks

tell application ''Adobe InDesign CS4''

set myDocument to active document

set horizontal measurement units of view preferences to inches

set vertical measurement units of view preferences to inches

tell document preferences of myDocument

set myPageWidth to page width

set myPageHeight to page height

set myProfile to preflight Working Profile

end tell

end tell

tell application ''Adobe Photoshop CS4''

set myDocument to make new document with properties {width:myPageWidth, height:myPageHeight}

tell myDocument

resize image resolution myProfile

end tell

end tell

Get preflight Working Profile as AS...

%26gt; set myProfile to preflight Working Profile

Try:

set myProfile to preflight Working Profile of preflight options

Do yourself a favor and get a copy of Script Debugger; it's Explorer makes this sort of thing so simple.

--

Shane Stanley %26lt;sstanley@myriad-com.com.au%26gt;

AppleScript Pro Sessions %26lt;http://scriptingmatters.com/aspro%26gt;

No comments:

Post a Comment