Skip to main content
Participant
November 29, 2021
Question

i can't write json file in PS

  • November 29, 2021
  • 0 replies
  • 160 views

var docRef = app.activeDocument;

function createJSON(object){

var jsonFile= File("~/Desktop/test.json");

jsonFile.open("w");

jsonFile.write(JSON.stringify(object)); /////// the script has there stopped

jsonFile.close();

}

var obj = {

image_Name: docRef.name,

image_layer: docRef.layers.length,

image_W:docRef.width,

image_H:docRef.height

};

createJSON (obj);

 

//photoshop 2014

anybody can help me?

 

advance thanks...

This topic has been closed for replies.