Script doesn't work in Photoshop CS3
Hello everyone!
Guys is there any possibility of a script working correctly in Photoshop CS3.
It serves to import a price table via a text.text file into a dialog window, once the text is loaded, I will have to make some changes to the text after saving.
At the company I work for, it works perfectly on the latest versions, however, in my house my computer is very limited and I can only work with the CS3 version of Photoshop
and this script I will need to use more often in my house.
All help is valid!
Here the script and the price list:
dle = new Window("dialog"); dle.text = "Tabela de Preços!";
dle.orientation = "column";
fFile = File ( "~/desktop/Preços.txt" );
fFile.open("r"); stringFromTextFile = fFile.read(); valores = stringFromTextFile.split();
edittext1 = dle.add('edittext {size: [240.59,305.556], properties: {name: "edittext1", multiline: true}}');
edittext1.text = valores
gp1 = dle.add("group", undefined, {name: "gp1"});
bt2 = gp1.add("button", undefined, undefined, {name: "bt2"});
bt2.text = "Salvar"; bt2.preferredSize.width = 90;
bt1 = gp1.add("button", undefined, undefined, {name: "bt1"});
bt1.text = "Fechar"; bt1.preferredSize.width = 90;
bt2.onClick = function (){
dle.close(); var URL = new File("~/desktop/Preços.txt"); URL.open("w"); URL.writeln(edittext1.text);
}
dle.show();
ADESIVO: 75,00 | Amador 65,00 | Profissional ----------------------------- CANVAS: 85,00 | Amador 75,00 | Profissional ----------------------------- LONA: 95,00 | Amador 85,00 | Profissional ----------------------------- PAPEL: 150,00 | Amador 120,00 | Profissional ----------------------------- OUTRO: 0,00 -----------------------------


