Yes that would be fairly easy to add.d3vi0n wrote: ↑Sat Apr 29, 2017 7:48 pm Is there a way to add a "comonFunctions.jsWriteFile" similar to "comonFunctions.jsReadFile" to GuideMe? I REALLY want to save image tags in text files (similar to what TeaseAI does) instead of renaming the images. I have over 50 different tags for the "Solo Pictures" category alone. No way to get that into image names or folder structures.
You can currently write files from javascript, however I don't think you can currently get the tease media directory so knowing where to store the files is an issue.
<![CDATA[
function pageLoad() {
var fileOut = "Test text to write to a file\r\n";
var file = new java.io.File("c:\\temp\\test.txt");
var fileWriter = new java.io.FileWriter(file);
fileWriter.write(fileOut);
fileWriter.write("Some more text\r\n");
fileWriter.flush();
fileWriter.close();
}
]]>
*Edit*
It will be in the next release
The files will be written to the guide media directory.
<![CDATA[
function pageLoad() {
var fileOut = "Test text to write to a file\r\n";
guide.jsWriteFile("SingleLine.txt", fileOut);
var lines = [];
lines[0] = "First Line";
lines[1] = "Second Line";
lines[2] = "Third Line";
lines[3] = "Fourth Line";
lines[4] = "Fifth Line";
lines[5] = new Date();
guide.jsWriteFileArray("Saves/FiveLines.txt", lines);
var readLine = guide.jsReadFile("SingleLine.txt");
var readLines = guide.jsReadFileArray("Saves/FiveLines.txt");
var noLines = readLines.length;
}
]]>