Skip to main content
lénárta52799202
Participating Frequently
March 11, 2025
Question

Indesign scripts are not working in the 2025 Indesign version.

  • March 11, 2025
  • 2 replies
  • 950 views

Since 2018, we have been using several scripts for PDF export, which worked perfectly. Unfortunately, since the 2025 update, there is no error message, but it does not create the requested pdf.

This is how the script source looks like:

 

tell application "Adobe InDesign 2025"

set mgFolder to file path of active document

set mgName to name of active document

set text item delimiters of AppleScript to {"."}

set mgShortName to text item 1 of mgName

set text item delimiters of AppleScript to ""

set page range of PDF export preferences to "All"

 

tell application id "com.adobe.InDesign"

set mgFilePath to mgFolder & mgShortName & ".pdf" as string

tell active document

export format PDF type to mgFilePath using "Kosmos_BoardGame_2017" with page range without showing options

end tell

display alert "A pdf elkészült a Kosmos_BoardGame_2017 presettel."

end tell

 

end tell

 

It should copy the pdf file next to the Indesign file, but it does not appear.

What should be changed in the script to make it work again?

Thank you.

 

2 replies

Legend
March 11, 2025

Once upon a time script compatibility across versions was a high priority.

While AppleScript still supports the alias type for HFS paths, someone missed that InDesign's general switch to posix paths trickled thru to the scripting subsystem. And, incompletely at that.

E.g. the file path property of your active document still yields an alias.

On the other hand, the export now requires a posix file.

Btw no need for the double tell application ….

 

tell application id "com.adobe.InDesign"

set mgFolderAlias to file path of active document

set mgFolder to POSIX path of mgFolderAlias

set mgName to name of active document

set text item delimiters of AppleScript to {"."}

set mgShortName to text item 1 of mgName

set text item delimiters of AppleScript to ""

set page range of PDF export preferences to "All"

set mgFilePath to mgFolder & mgShortName & ".pdf" as string

tell active document

export format PDF type to mgFilePath using "Kosmos_BoardGame_2017" with page range without showing options

end tell

display alert "A pdf elkészült a Kosmos_BoardGame_2017 presettel."

end tell

lénárta52799202
Participating Frequently
March 12, 2025

Very good, the script works fine again. 😀

I can't thank you enough for this! thank you very much for the quick help!

telred18
Inspiring
March 11, 2025

Have you tried creating subfolders inside your Scripts folder for older scripts? I've got some VERY old scripts from InDesign CS2 in a 'Version 4.0 Scripts' subfolder that still work. I assume CC2024 scripts would be 'Version 19.0 Scripts'.