Skip to main content
Known Participant
August 26, 2008
Question

[JS] How to export text that is in the script

  • August 26, 2008
  • 1 reply
  • 307 views
I would like to export to a .txt file text that is in the script itself, not text that is in the ID document. Specifically I want to make a text file of the information that is in an alert.

Why does this not work?:

var someText = "Hi there";

someText.exportFile(ExportFormat.textType, File("/c/myText.txt"),true);

Thanks,
Tom
This topic has been closed for replies.

1 reply

Inspiring
August 26, 2008
Because someText is a string and String variables don't have an exportFile method.

See: http://jsid.blogspot.com/2006_04_01_archive.html

and scroll down to "A Better Log Function" to see how to write text to a text file.

Dave