Copy link to clipboard
Copied
I have a function which creates a new tif file in a folder on the desktop. It has a global variable 'bCode' that works but as soon as I append an additional variable 'cCode' it no longer works. Any idea what would cause this?
This works
var bCode = "007745";
function save4x6() {
var saveFileTif = new File("~/Desktop/" + bCode + "_Mock_ups/" + bCode + "_CVR.tif");
this doesn't, just adding the additional variable cCode it fails, it doesn't output.
var bCode = "007745";
var cCode = "NLA";
function save4x6() {
var saveFileTif = new File("~/Desktop/" + bCode + "_Mock_ups/" + bCode + "_CVR" + cCode+".tif");
I got it. The issue was that this was a bridge talk from ID to Pshop and I needed to grep the var.
psScript = psScript.replace(/bCode/g, "\"" + bCode + "\"");
psScript = psScript.replace(/cCode/g, "\"" + cCode + "\"");
Copy link to clipboard
Copied
I got it. The issue was that this was a bridge talk from ID to Pshop and I needed to grep the var.
psScript = psScript.replace(/bCode/g, "\"" + bCode + "\"");
psScript = psScript.replace(/cCode/g, "\"" + cCode + "\"");