How to save input values from text box?
I searched here and saw a good example using customOptions.
Why does not my Photoshop recognize this string?
("77F66FF5-EFAD-49B7-AFE3-8A1403376CB8")
How to find, get and validate these string so that it works perfectly?
I saw something here but it did not work in any key I generated.
Here is a small dialog box with two text boxes that I need to save the values whenever I need to open the window.
dlg = new Window("dialog", "new project", [0, 0, 255, 100], {resizeable: true});
text01 = dlg.add("edittext", {x: 26, y: 26, width: 48, height: 20}, "");
text02 = dlg.add("edittext", {x: 86, y: 26, width: 48, height: 20}, "");
var desc = app.getCustomOptions("77F66FF5-EFAD-49B7-AFE3-8A1403376CB8");
text01.text = desc.getString(0); button = dlg.add("button", [162, 26, 232, 46], "Ok");
button.onClick = function() {
var desc = new ActionDescriptor();
desc.putString(0, text01.text);
app.putCustomOptions("77F66FF5-EFAD-49B7-AFE3-8A1403376CB8", desc, true);
}
dlg.center();
dlg.show();
Can anyone explain to me how this method works?
