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

Re: Output function (results to a file) in Extendscript

$
0
0

Here's the code I have, but the Extendscript debugger says oFile.open is not a function, is this only for javascript?

 

Thanks,

 

Keith

 

function processDoc (doc) {

 

        //Process the paragraphs and tables in the main document flow

 

        var textList, count = 0, i = 0, tbl = 0, pgf = 0;

        var oFile = "c:\myname\tags-list.txt";

 

        // Turn off the document display to speed the script and

        // prevent screen flicker.

        if (app.Displaying == 1) {

        app.Displaying = 0;

        }

       

        //Process each top-level paragraph in document

       

        oFile.open("a");

        pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;

 

        while (pgf.ObjectValid()) {

       

    //!!    applyNewPgfFmt(pgf,doc);

   

    oFile.Writeln(pgf.Name);

           

            pgf = pgf.NextPgfInFlow;

        }

       

    oFile.close();


Viewing all articles
Browse latest Browse all 3715

Trending Articles



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