no value for noecho edittext box

Community Beginner ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

I have seen and read this post but didn't find a contextual solution for what I'm encountering: https://community.adobe.com/t5/photoshop-ecosystem-discussions/ps-21-2-0-window-object-edittext-noec...

 

Here's my code:

 

var w = new Window ('dialog {alignChildren: "fill"}');
    w.add ("statictext", undefined, "Login and verify your product:");
    w.add ("statictext", undefined, "Username:");
    var username = w.add ('edittext', undefined, '');
    w.add ("statictext", undefined, "Password:");
    var pw = w.add ('edittext', undefined, '', {noecho: true});
    w.add ("statictext", undefined, "Product Key:");
    var productkey = w.add ('edittext', undefined, '');
    var confirmForm = w.add ("button", undefined, "OK");
    var cancelForm = w.add ("button", undefined, "Cancel");
    confirmForm.onClick = function () {
	alert(username);
	alert(pw);
	alert(productkey);
    }
    cancelForm.onClick = function () {
        w.close();
    }
    w.show();

 

 

The pw variable always shows like this with no value: 

image.png

I have no idea what's going on. It feels like a bug, help? I hope it's not a typo I'm not seeing... 

TOPICS
Actions and scripting , macOS

Views

52

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

meant to post the confirm click like this:

confirmForm.onClick = function () {
	alert(username.text);
	alert(pw.text);
	alert(productkey.text);
    }

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

Might be a bug indeed; if I add some text right away I get that text as an alert even though I entered another text. 

And if I edit the text repeatedly it seems the alert is »one step« behind. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

LATEST

I don't know what is problem, but I think here in Photoshop 23.2 on Windows everything works.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines