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