Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

TextLoc works once, then stops working

$
0
0

I have this simple code:

 

var doc = app.ActiveDoc;

var t1 = new TextLoc();

var firstPgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;

t1.obj = firstPgf;

doc.AddText (t1, "Hello");

 

When I ran it the first time from the ES toolkit code window, it printed "Hello" on the first line of the active Fm document. But when I ran the code again a moment later on the same doc, nothing happens. There are no visible errors and it prints "Result: [object TextLoc]" in the JavaScript console.

 

I can't get it to run again. This happened a few days ago and I gave up. Then just now I decided to try it again and it did the same thing - printed "Hello" once in the Fm doc, then it would not do it again. I've tried restarting Fm and the toolkit.

 

Any ideas what is causing this?

 

Thanks,

Mark


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>