Copy link to clipboard
Copied
I have a load of scripts used to produce different PDF's. These will not work in the New InDsesign 2025.
Attched screenshot of error message.
This is one of the codes which I have used for over 10 years until the new version.
tell application id "com.adobe.indesign"
set _NoCrops to PDF export preset "No Crops"
set _Crops to PDF export preset "Crop NO Text"
set _dest to path to desktop as string
tell active document
set _Name to name
if _Name ends with ".indd" then
set _Name to text 1 thru -6 of _Name
end if
set noCropPath to _dest & _Name & " PROOF" & ".pdf"
set cropPath to _dest & _Name & " PRINT" & ".pdf"
export format PDF type to noCropPath using _NoCrops without showing options
export format PDF type to cropPath using _Crops without showing options
end tell
end tell
tell application "Finder"
set label index of file noCropPath to 7
set label index of file cropPath to 2
end tell
<Title renamed by MOD>
Thanks you Can now exprt the 2 PDF's and add the extra words to the file name using this line
set _dest to "Machintosh HD/Users/username/Desktop/"
Just need to sort label tag colour change.
I think i might be in way over my head here as I have no idea what to do with that i'm sorry.
By @Luke25170286g4xv
In your particular script, all you need to do is change
export format PDF type to mgFilePath using "HR PDF" without showing options
to
export format PDF type to (POSIX path of mgFilePath) using "HR PDF" without showing options
Copy link to clipboard
Copied
Sorry, I'm not a Mac user or AppleScript coder 😉
But it looks like you need to add conversion to POSIX.
Copy link to clipboard
Copied
By @Luke25170286g4xv
may i point you to the answer i have already given you:
POSIX path of yourHFSPath
for example:
POSIX path of mgFolder
(there are several other ways to obtain posix paths but this one is the easiest in your case).
Copy link to clipboard
Copied
I think i might be in way over my head here as I have no idea what to do with that i'm sorry.
Copy link to clipboard
Copied
I think i might be in way over my head here as I have no idea what to do with that i'm sorry.
By @Luke25170286g4xv
Will be much easier to modify your code - if you post it here as a code/text - instead of a screenshot.
Copy link to clipboard
Copied
Thanks @Robert at ID-Tasker
tell application id "com.adobe.InDesign"
set mgFolder to file path of active document
set mgDocName to name of active document
end tell
tell application "Finder"
if (exists folder "HR PDF" of folder mgFolder) is false then
make folder at mgFolder with properties {name:"HR PDF"}
end if
end tell
tell application id "com.adobe.InDesign"
repeat with x in pages of active document
set mgPageName to name of x
set page range of PDF export preferences to mgPageName
tell active document
set mgFrames to (text frames of x whose name of item layer is "file_name")
set mgFrame to item 1 of mgFrames
set mgText to contents of item 1 of mgFrame
set mgFilePath to mgFolder & "HR PDF:" & mgText & ".pdf" as string
export format PDF type to mgFilePath using "HR PDF" without showing options
end tell
end repeat
display dialog "Export complete legend" buttons {"OK"} default button 1
end tell
Copy link to clipboard
Copied
I think i might be in way over my head here as I have no idea what to do with that i'm sorry.
By @Luke25170286g4xv
In your particular script, all you need to do is change
export format PDF type to mgFilePath using "HR PDF" without showing options
to
export format PDF type to (POSIX path of mgFilePath) using "HR PDF" without showing options
Copy link to clipboard
Copied
Absolute legend, worked a treat. Thank you so much @leo.r and @Robert at ID-Tasker , keeping it simple for someone without any real prior knowledge of scrips and keeping patient at the same time. Thank you!!
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now