photools.com Community

IMatch Bug Reports and Feature Requests => Feature Requests => Archive (Feature Requests) => Topic started by: lenmerkel on August 13, 2014, 06:24:53 AM

Title: Scripting: Application.ReadTextFile function - return text content
Post by: lenmerkel on August 13, 2014, 06:24:53 AM
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 (https://www.photools.com/community/index.php?topic=3125.0).
Title: Re: Scripting: Application.ReadTextFile function - return text content
Post by: Mario on March 23, 2015, 11:49:30 AM
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.