FrameMaker DOM
Hi there,
I have a very basic question but I couldn't find an adequate answer for me yet.
I just started trying to write a jsx script to select the first graphic in the document which lies within an anchored frame. I want to get the File name of this graphic and replace the whole graphic+frame with just the file name of the referenced graphic.
That's my plan so far... But I don't really understand how to even select the graphic.
I read some documents and found stuff like "NextGraphicInDoc" etc.
So I tried:
var doc = app.ActiveDoc;
var graphic = doc.NextGraphicInDoc;
I tried several other things like:
doc.NextAFrame.FirstGraphicInFrame;
But I always get undefined as output. So I clearly don't understand the DOM on how to approach the elements of the doument properly and use them.
Could someone maybe enlighten me? I think once I get the gist of how to handle this properly I can get further myself but I am stuck at the beginning.
Thanks in advance. I also appreciate good beginner friendly sources if available. The 1000+ Page from Adobe for FM Scripts don't really help that much 😕😕
