Got text working.

This commit is contained in:
Unknown
2018-03-29 14:30:42 -04:00
parent ff38043a10
commit 669d1182f4
9 changed files with 87 additions and 71 deletions

View File

@@ -2,7 +2,13 @@
var stdout = newFile(arguments[0]);
var lyr = eval(arguments[1]);
stdout.writeln(('{"Name":"' + lyr.name + '","Bounds":[[' + lyr.bounds[0] + ',' +
stdout.write(('{"Name":"' + lyr.name + '","Bounds":[[' + lyr.bounds[0] + ',' +
lyr.bounds[1] + '],[' + lyr.bounds[2] + ',' +
lyr.bounds[3] + ']],"Visible":' + lyr.visible + '}').replace(/ px/g, ""));
lyr.bounds[3] + ']],"Visible":' + lyr.visible+',"Text":').replace(/ px/g, ""));
if (lyr.kind == LayerKind.TEXT) {
stdout.write('"'+lyr.textItem.contents.replace(/\r/g, "\\r")+'"');
}
else
stdout.write(null)
stdout.writeln('}')
stdout.close();