I need an extendscript to loop through all the files in a book and align the graphics to center.
Thanks in advance.
(Moved to FrameMaker Scripting Forum.)
What is your question? Do you need help in developing such a script? Also, it will help others, if you are a little bit more specific on the requirement.
You can find the ExtendScript developer documentation in the FrameMaker Developer Center.
Yes I need help in developing the script. I have a book with four files. All those four files have graphics in them.
I am using Adobe Framemaker Structured application 7.1 and 10. By default the images are aligned to the left. I need the images to be aligned right. I want a script to loop between the documents and select the graphic one by one and align it to the center.
I guess you only want to loop through graphics in the main text flow ("A")? Or also on graphics on Master Pages and Reference Pages?
And the graphics are all inside an anchored frame and need to be center-aligned within that Frame? Or do you need to change the anchored frame? You see, there are a lot of details to think about and to specify 🙂
Next problem: So it is a structured application, the position is defined by attributes.
In this case you have to change the attributes.
If I am able to fix this issue in the attributes I wouldn't be needing the extendscript.
<!ELEMENT graphic EMPTY>
format CDATA #IMPLIED
entity CDATA #IMPLIED
xoffset CDATA #IMPLIED
yoffset CDATA #IMPLIED
position CDATA #IMPLIED
align CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
is fm graphic element "Graphic";
fm property import by reference or copy value is "ref";
attribute "xoffset" is fm property horizontal offset;
attribute "yoffset" is fm property vertical offset;
is fm property position;
value "below" is fm value "below";
is fm property alignment;
value "left" is fm property value align left;
value "right" is fm property value align right;
value "middle" is fm property value align center;
attribute "width" is fm property width;
attribute "height" is fm property height;
<graphic format = "EPS" entity = "1234" xoffset = "0.197in" yoffset = "0.394in" position = "below" align = "middle" width = "6.870in" height = "8.341in"/>
I am new to structured framemaker. I need the eps file to be aligned in the center of the anchored frame. Any help is appreciated.
I also have sample scripts here that show things like walking through a book and how to set attributes:
In all honesty, you may be asking too much from this forum. We can help with specific, focused questions, but it is not likely that someone can just write a script for you for free.
Have a look at this blog post and download the scripts: FrameMaker Super Find / Change Reloaded – Adobe TechComm Blog
For example, the
BookIterator.jsx is used to loop through the book. There are a couple of other scripts that show how to loop through objects (although there is no specific one for graphics). Should be a good start.