Scripting: Application.ReadTextFile function - return text content

Started by lenmerkel, August 13, 2014, 06:24:53 AM

Previous topic - Next topic

lenmerkel

Please consider changing the Application.ReadTextFile function to return the String containing the text file content as the return value, instead of a boolean success/failure return value as it does currently. A null return value can indicate failure. This would enable the function to be usable in JavaScript as part of an App, via IMatchLib.application().ReadTextFile.

Alternatively (in order not to break existing VB scripts), provide a new function to do the same.

This is in reference to the following post: Calling Application.ReadTextFile from js in App.
Over the hill, and enjoying the glide.

Mario

This can be done with the standard JavaScript FileReader class.

I have also added a ReadTextFileJS method to the Application class, which returns a String and does not require reference parameters. Release 5.3.16.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook