Highlighted

import formats and edd in subfolders

Explorer ,
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

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

TOPICS
Scripting

Views

652

Likes

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

import formats and edd in subfolders

Explorer ,
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

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

TOPICS
Scripting

Views

653

Likes

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
May 30, 2016 0
Mentor ,
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

Likes

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
Reply
Loading...
May 31, 2016 0
Explorer ,
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....

Likes

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
Reply
Loading...
May 31, 2016 0
Mentor ,
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

Likes

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
Reply
Loading...
Jun 01, 2016 0
Explorer ,
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

Likes

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
Reply
Loading...
Jun 09, 2016 0
Advocate ,
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

Likes

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
Reply
Loading...
Jun 09, 2016 0
JCmayer LATEST
Explorer ,
Jun 09, 2016

Copy link to clipboard

Copied

Thank you Jang

Likes

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
Reply
Loading...
Jun 09, 2016 0