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

Does an InDesign script have access to the name/path of an open IDML file?

Participant ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

Hi,

Assuming you've opened an IDML file, so it's now the active document. Does InDesign remember its name and/or path? Can a script access that information?

Thanks!

TOPICS
Scripting

Views

499

Translate

Translate

Report

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 ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

Name you can get using the name property of the document like below

app.documents[0].name

Path I think we won't be able to get.

-Manan

Votes

Translate

Translate

Report

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 ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

Hm.

You'll get the path of course if you open the IDML file by scripting.

Or if you intercept the user's intention to open a document through an event script that is hooked to the File Open dialog…

( Just an idea… )

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

Translate

Translate

Report

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
Participant ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

That interception is an interesting idea. What if the user simply double clicks the file in Finder / File Explorer? Is there a way to intercept a file opened this way?

 

Either way, do you have a sample script I could refer to in order to learn how to do that? So far I've only written scripts you need to manually run from the scripts panel.

Votes

Translate

Translate

Report

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 ,
Apr 18, 2023 Apr 18, 2023

Copy link to clipboard

Copied

@orib7317974 said: "What if the user simply double clicks the file in Finder / File Explorer?"

 

Hm. I think, that this case is not covered with the File > Open… menu.

Did some tests with some code, but I'm still not satisfied with the results.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

Translate

Translate

Report

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
Participant ,
Apr 21, 2023 Apr 21, 2023

Copy link to clipboard

Copied

LATEST

I appreciate you did those tests for me, thank you very much!

Votes

Translate

Translate

Report

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