InDesign Export with Posix Path

Hi,

I tested both open and export command passing HFS and Posix path (that can include blank space). No need to quote.

The open command fail is path is posix and the term "file is used.
Export work in all 4 conditions.

Anyone can confirm me if the term “file” must be used or can be skipped using paths as string?

tell application “Adobe InDesign CS6”
activate
–open “Lion:Users:adminosx:Desktop:test 1.indd” → OK
–open file “Lion:Users:adminosx:Desktop:test 1.indd” → OK
–open “/Users/adminosx/Desktop/test 1.indd” → OK
open file “/Users/adminosx/Desktop/test 1.indd” – Error
tell active document
export format JPG to “Lion:Users:adminosx:Desktop:test 1.jpg” → OK
export format JPG to file “Lion:Users:adminosx:Desktop:test 1.jpg” → OK
export format JPG to “/Users/adminosx/Desktop/test 1.jpg” → OK
export format JPG to file “/Users/adminosx/Desktop/test 1.jpg” → OK
end tell
end tell

Ame

Update:

Working with CS4 the export on Posix file seems “broken”
Don’t return error but file is not created. in CS6 (and maybe also in CS5) all works good.

Ame

Another update:

using CS4 also the open don’t work with Posix path. Seems that between versions Adobe changed or fixed something.

Ame

Hi,

quotation is only needed in a shell environment where a space character is a parameter separator
and some characters are treated specially.

Basically the file specifier of AppleScript expects always a colon separated HFS path,
although the Objective-C NSAppleEventDescriptor translation could be modified to consider POSIX paths too

From my experience with Indesign the most reliable syntax for open and export commands is using HFS paths without the file specifier

Many thanks Stefan for your opinion.

Ame