The exported document is a jpg file. The file should be saved in a specific folder with the same name of the document in the shared documents directory.
The problem is that the file isn’t saved in the specific folder, its saved in the root of the shared documents. Can someone sort this out for me? Here is my script.
tell application "Adobe InDesign CS3"
set docu to active document
set docName to name of docu
--filtering the extension out the document's name if any
if docName contains ".indd" then
set countCharacter to count every character of docName
set countResult to countCharacter - 5
set docName to characters 1 thru countResult of docName as string
end if
--create folder with name of document in the shared folder
do shell script "mkdir -p /Users/Shared/" & docName
delay 1
set thePath to "Macintosh HD:Users:Shared:" & docName
--exporting the document as jpg
tell JPEG export preferences
set properties to {JPEG Quality:low, JPEG Rendering style:baseline encoding}
end tell
tell docu
export format JPG to (thePath & ".jpg") without showing options
end tell
end tell