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
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