I need help for .csv

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

sasientry

I need help for .csv

Post by sasientry »

Hi all,

When i open the file the .csv was created and star time also created

But i have one problem When i close the file i want to enter end time of this file

could you please help me

main();
function main(){
if(!documents.length) return;
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()

var currentTime = new Date()
var H = currentTime.getHours()
var M = currentTime.getMinutes()



TextInfo= decodeURI(activeDocument.name);
var file = new File(Folder.desktop + "/"+day+ month+ year +"SRAM.csv");
file.open("e", "TEXT", "????");
$.os.search(/windows/i) != -1 ? file.lineFeed = 'windows' : file.lineFeed = 'macintosh';
file.seek(0,3)
file.writeln(decodeURI(activeDocument.name)+","+H+":" +M+",");
}