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

import formats and edd in subfolders

Explorer ,
May 30, 2016 May 30, 2016

Copy link to clipboard

Copied

Hello everyone.

I'm newbie in ExtendScript FrameMaker, and it seems a great tool!

My problem is that I have a folder in which I have full subfolders.

In this subfolders, I have structured ".fm" files in which, I would like to import a format and edd ...

I can't.

Someone could help me for the beginnig?

Thank a lot

TOPICS
Scripting

Views

831

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

correct answers 1 Correct answer

Advocate , Jun 09, 2016 Jun 09, 2016

JC,

A foreign language can be difficult, but that does not mean we are not willing to helping newbies. You cannot expect experienced programmers to explain all of ExtendScript in just a couple of posts. It took me 5 years of full-time trial and error - and posting questions - to get to where I am today.

Trial and error are the best ways to learn ExtendScript. Use the Scripting Guide supplied by Adobe on their website: Adobe FrameMaker Scripting Guide (2015 release)

Start with simple programs. Take

...

Votes

Translate

Translate
Mentor ,
May 31, 2016 May 31, 2016

Copy link to clipboard

Copied

JCmayer,

You need to open each document individually, import the EDD, then save and close it. The task of opening and saving a document is the most difficult... to import an EDD is a single call with SimpleImportElementDefs().

I don't have the time to write this script for you, but I can direct you to this page which has a sample on how to open a document:

FrameMaker ExtendScript Samples - West Street Consulting

You would need to adapt it to use all applicable paths to your files. That's the best I can do for you at the moment, I hope it helps some. This does sound like an excellent use case for ExtendScript.

Russ

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
Explorer ,
May 31, 2016 May 31, 2016

Copy link to clipboard

Copied

Thank a lot Russ,

Ok

I don't use book, and I have a list of my files like that

var fileList = FolderToTreat.getFiles("*.fm");

and after i would like treat each file like this

var i = 0;

for (i = 0; i < fileList.length; i++)

{

file = fileList;

OpenFile(file);

if (file instanceof Folder)

{

GetFiles(file, mask);

}

}

my problem that I don't know how to select each file for open them....

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
Mentor ,
Jun 01, 2016 Jun 01, 2016

Copy link to clipboard

Copied

You need to learn how to open files. Assuming that your fileList variable has a valid list of paths (which I am not clear on whether it does, because I can't fully understand your code), you would open them one at a time. See the sample on that page I pointed you to for an example on how to open a single file.

It seems that you may need to back up a bit and study ExtendScript a bit more.

Russ

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
Explorer ,
Jun 09, 2016 Jun 09, 2016

Copy link to clipboard

Copied

Russ,

Everyone doesn't speak English ... and sometimes it is difficult to understand it!

I thought the forums were to help newbies, but I am wrong!

Thanks

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
Advocate ,
Jun 09, 2016 Jun 09, 2016

Copy link to clipboard

Copied

JC,

A foreign language can be difficult, but that does not mean we are not willing to helping newbies. You cannot expect experienced programmers to explain all of ExtendScript in just a couple of posts. It took me 5 years of full-time trial and error - and posting questions - to get to where I am today.

Trial and error are the best ways to learn ExtendScript. Use the Scripting Guide supplied by Adobe on their website: Adobe FrameMaker Scripting Guide (2015 release)

Start with simple programs. Take small steps. First open a single file in FM via a script. Then import an EDD. Then import formats. Takes each step when the previous step works and you understand the code you have written.

Do not expect to have your full program running in just a couple of hours.

Good luck on learning ExtendScript

Jang

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
Explorer ,
Jun 09, 2016 Jun 09, 2016

Copy link to clipboard

Copied

LATEST

Thank you Jang

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