Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Scripts Not Functioning After Update to InDesign CC 2025

Explorer ,
Oct 14, 2024 Oct 14, 2024

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>

TOPICS
Scripting
11.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Explorer , Oct 16, 2024 Oct 16, 2024

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.

Translate
Community Expert , Mar 05, 2025 Mar 05, 2025
quote

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
Translate
Community Expert ,
Oct 15, 2024 Oct 15, 2024
quote

I am not allowed to save any files outside OneDrive folder.

By @mstavri

 

Can you please elaborate:

 

Does it mean that your company policies prohibit you from saving any files outside OneDrive? Or that there's an issue with InDesign saving outside OneDrive?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 15, 2024 Oct 15, 2024

the only storage permitted for company files is on OneDrive. I have already tested with /Users/iorgulescudan/test/ with blank sample files and there are same errors.

Indesign has Full Disk access and One Drive acccess 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 15, 2024 Oct 15, 2024
quote

the only storage permitted for company files is on OneDrive. I have already tested with /Users/iorgulescudan/test/ with blank sample files and there are same errors.

Indesign has Full Disk access and One Drive acccess 


By @mstavri

 

Technically, you are still saving locally - and your files are automatically synchronised with OneDrive. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2024 Oct 15, 2024

Ok this seems to be your problem:

 

file (export_path & OpenFileNameActiveWOExt & "-interactive.pdf")

 

Remove file - it cannot (and should not) be used with POSIX paths  (same as alias). just use the POSIX path without anything else.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2024 Oct 16, 2024

Thanks. now it works. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 15, 2024 Oct 15, 2024

The probelm is that InDesign isn't producing the PDF's.
I have removed the last part of the code, this elimates the error code, because it can't find the PDF's on the desktop.

Looking at other comments about paths need changing, this line may be the problem
'set _dest to path to desktop as string'. 

Can anyone advise how the path should be up dated to work in v20.0.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2024 Oct 16, 2024
quote

Looking at other comments about paths need changing, this line may be the problem
'set _dest to path to desktop as string'. 

Can anyone advise how the path should be up dated to work in v20.0.


By @LawtonKAR

 

for a quick solution, just use POSIX path of cropPath

 

i can't go further into depth about posix paths right now, but you can look up something like 'posix paths in AppleScript'

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2024 Oct 16, 2024

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2025 Jan 28, 2025

I have a similar problem, but POSIX path didn't fix it for me. 

The scenario is InDesign runs an ApplesScript routine to creatte either a jpg or pdf file from an IDML template. I have two users A & B. A is a Macos Admin, B is a regular user.  The AppleScript works great when run from the AppleScript editor as either of them. The problem arises when InDesign is invoked from PHP running under Apache. When all the files are owned by A and Apache is running as user A all works as expected. However, if the files are owned by B, and Apache is running as B, when InDesign tries to do an export, it fails with a 'file is open' error. If the file is deleted before starting the Applescript the export does not output the file. But there is no error message.

I'd rather not run Apache as a user with admin rights.  Any ideas? 

Thanks,

Carl

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2025 Jan 28, 2025
quote

I have a similar problem, but POSIX path didn't fix it for me. 

The problem arises when InDesign is invoked from PHP running under Apache. When all the files are owned by A and Apache is running as user A all works as expected.

I'd rather not run Apache as a user with admin rights.  Any ideas? 


By @CarlForde

 

Frankly, I don't know much (well, anything) about running AppleScript from PHP under Apache. You didn't mention if the problem started after updating to InDesign 2025, or a macOS update, or something else. But if running as a user with admin rights solves the problem, then maybe it's the best solution.

 

Apple also keeps introducing all kinds of security changes which may affect your scenario, too. In any case, you may have better luck asking this question on stackoverflow.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 29, 2025 Jan 29, 2025

We are replacing a Mac mini running Ventura 13.2.1 and InDesign 2023 18.2.1 with a new Mac mini running Sequoia 15.2 and InDesign 2025 20.1. Having Apache running as an admin user is bad practice from a security point of view. So I'd rather not do that. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2025 Jan 29, 2025

@CarlForde

 

Don't want to be too picky - but what you're trying to do - you should rather do using InDesign Sever?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 29, 2025 Jan 29, 2025

We considered that. However the pricing $13,500/year is not in the budget. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2025 Jan 29, 2025
quote

We are replacing a Mac mini running Ventura 13.2.1 and InDesign 2023 18.2.1 with a new Mac mini running Sequoia 15.2 and InDesign 2025 20.1.

By @CarlForde

 

I know you're replacing your old Mac, but if you still plan to use it for more than a few hours, then make sure to update Ventura to its latest version. Anything below 13.5 can cause various issues with InDesign. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2025 Mar 05, 2025

Hi all, apologies for tagging along with this post but i'm also having a similar problem since updating to Indesign 2025 (v20). We run a script which outputs indiviual pdf pages from a multi page document, named using a specific filename on a seperate layer into a HR Folder in the same folder location as the active indesign doc. This has worked for years prior, and still does with Indesign 2024 so just wondering what the fix could be here? Currently holding back on full update to 2025 but with a lot of other colleagues starting to update it's becomming a bit of a problem.

I run the script and it still runs as it should without any error messages however, in the HR PDF folder that it creates it is always empty with no PDF exported? Any help would be massively appreciated. Script we're using is attached below for ref - thank you! 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2025 Mar 05, 2025
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2025 Mar 05, 2025

Thanks @Robert at ID-Tasker , explains it clearly for a novice like myself to understand! So knowing that, is there a way to adjust/tweak the current script for it to work in POSIX path Style at all? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2025 Mar 05, 2025
quote

Thanks @Robert at ID-Tasker , explains it clearly for a novice like myself to understand! So knowing that, is there a way to adjust/tweak the current script for it to work in POSIX path Style at all? 


By @Luke25170286g4xv

 

POSIX path of yourHFSPath
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2025 Mar 05, 2025

@Luke25170286g4xv

 

I think this: 

 

1000030083.jpg

":" - you should change it to "/" or "\" - I'm not a Mac user. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2025 Mar 05, 2025

No good unfortunately @Robert at ID-Tasker , tried both with the same result being an Error Number: 258

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2025 Mar 05, 2025
quote

No good unfortunately @Robert at ID-Tasker , tried both with the same result being an Error Number: 258


By @Luke25170286g4xv

 

Can you post screenshot of the error message? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2025 Mar 05, 2025

Of course, sorry @Robert at ID-Tasker see below. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2025 Mar 05, 2025

@Luke25170286g4xv

 

As per error - there is no folder - probably, because it's still HFS path?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2025 Mar 05, 2025
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2025 Mar 05, 2025

The below is what i changed in the script as you suggested. Apologies for my low key understanding of this, it's a script i've picked up from an ex employee so not something i usually delve into. Have i misunderstood what you suggested @Robert at ID-Tasker ? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines