PS 21.2.0 Window object - edittext noecho does not return value

New Here ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

Hi all,

 

I'm using the "new Window("dialog");" to create a small form with username and password as a dialog. Untill recently everything was OK, but now one of the fields have stopped returning value.

 

 

        var login = group1.add('edittext {properties: {name: "login"}}');
        login.helpTip = "Username for access";
        login.preferredSize.width = 250;

 

 

 

        var passwd = group2.add('edittext {properties: {name: "passwd", noecho: "true"}}');
        passwd.preferredSize.width = 250;

 

 

 

        myWindow = dialog.show();

        if (myWindow == true){
            alert(login.text);
            alert(passwd.text);
        }

 

The first alert works as expected, the scond one always returns empty value (nothing in the alert).

 

Can you help me with this?

TOPICS
Actions and scripting

Views

142

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 ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

If you post your script most likly someone will.  With what you posted one need to imangine how you may have coded the dialog and script code.  If it had been working  was it broken by update 21.2 or did you make changes to the script or change your testing steps. It there button in the dialog that can cause a show 1 return code when the user has not set the name and password

 

JJMack

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
New Here ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

// DIALOG
        // ======
        var dialog = new Window("dialog");
        dialog.text = "Login";
        dialog.orientation = "column";
        dialog.alignChildren = ["center", "top"];
        dialog.spacing = 10;
        dialog.margins = 16;

        // GROUP1
        // ======
        var group1 = dialog.add("group", undefined, {
            name: "group1"
        });
        group1.orientation = "row";
        group1.alignChildren = ["left", "center"];
        group1.spacing = 10;
        group1.margins = 0;

        var statictext1 = group1.add("statictext", undefined, undefined, {
            name: "statictext1"
        });
        statictext1.text = "Username";
        statictext1.preferredSize.width = 150;

        var login = group1.add('edittext {properties: {name: "login"}}');
        login.helpTip = "Username for access";
        login.preferredSize.width = 250;

        // GROUP2
        // ======
        var group2 = dialog.add("group", undefined, {
            name: "group2"
        });
        group2.orientation = "row";
        group2.alignChildren = ["left", "center"];
        group2.spacing = 10;
        group2.margins = 0;

        var statictext2 = group2.add("statictext", undefined, undefined, {
            name: "statictext2"
        });
        statictext2.text = "Password";
        statictext2.preferredSize.width = 150;

        var passwd = group2.add('edittext {properties: {name: "passwd", noecho: "true"}}');
        passwd.preferredSize.width = 250;

        // GROUP3
        // ======
        var group3 = dialog.add("group", undefined, {
            name: "group3"
        });
        group3.orientation = "row";
        group3.alignChildren = ["left", "center"];
        group3.spacing = 10;
        group3.margins = 0;

        var okBtn = group3.add("button", undefined, undefined, {
            name: "okBtn"
        });
        okBtn.text = "OK";

        var cancelBtn = group3.add("button", undefined, undefined, {
            name: "cancelBtn"
        });
        cancelBtn.text = "Cancel";
        myWindow = dialog.show();

        if (myWindow == true){
            alert(login.text);
            alert(passwd.text);
        }

This is the section with the Window. The alerts on the end should display the data entered in Username and Password fields - the data for "login" is hown, but for the "passwd" is not.

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 ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

On my 21.2 it work if  enter data in both fields before an enter or OK click. Esc and Alt+F4 cancel.  However Ctrl+Break Acts like Enter and OK that could be a bug in 21.2. I'll test other version of PS.

JJMack

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 ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

It looks like the Ctrl+Break problem was introduced some time after CC2014.  Adobe replaced their ScriptUI implemented   with a new version in CC 2015 moved from a flash base to and html based implementation.  There ares some compatibility issues between versions.  The Ctrl+Brake issue was mostly likely introduced in CC 2015 ScriptUI.   I no longer have CC 2015, CC 2015.5 and CC 2017 installed.

 

CS3, CS6, and CC 2014 do not have the Ctrl+Brake issue.  

JJMack

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

Using with script Ctrl & Break in:

- ESTK CC results as a warning the text can't be copied

- CS6 Extended results as End-of-Text character (ETX)

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