PPG with star password input?

13 views
Skip to first unread message

Hans Payer

unread,
Nov 24, 2009, 2:17:46 PM11/24/09
to soft...@listproc.autodesk.com
Is there to modify a ppg layout string parameters so as a user type in a password into a text field, the characters are displayed as stars? Like "******"?

I can't seem to find anything. if it worked on Windows and Linux, that would be great also.

Thanks

Hans

Stephen Blair

unread,
Nov 24, 2009, 2:50:17 PM11/24/09
to soft...@listproc.autodesk.com
Maybe you could use dscontrol with the ES_PASSWORD style?

Search the sdk doc for dscontrol.

Stephen Blair
Product Support Team Lead, Softimage
Montreal, Quebec, Canada
Blog<http://xsisupport.wordpress.com/> | KB<http://autodesk.com/softimage-support> | Wiki<http://autodesk.com/softimage-kb>

If you would like to comment on my work, please contact my manager chris....@autodesk.com<mailto:sy.do...@autodesk.com>.
Autodesk Subscription<http://www.autodesk.com/subscription> The smartest way to optimize your software investment.

winmail.dat

Hans Payer

unread,
Nov 24, 2009, 4:35:37 PM11/24/09
to soft...@listproc.autodesk.com
It looks like it could do the trick. but there's not much reference in the SDK. I got this so far by guessing but the 3rd line fails

item = layout.AddItem("password", "", "dscontrol")
item.SetAttribute( "Class", "Edit" )
item.SetAttribute( "siUIStyle", "ES_PASSWORD")

I also tried:
item.SetAttribute( "Caption", "ES_PASSWORD") #doesn't fail but the ES_PASSWORD doesn't do anything
item.SetAttribute( "Caption", "ES_PASSWORD= 1") #same
item.SetAttribute( "Caption", ";ES_PASSWORD= 1") #same

Any tips where I can find dscontrol info? Google isn't giving me much.

Xavier Lapointe

unread,
Nov 24, 2009, 4:40:14 PM11/24/09
to soft...@listproc.autodesk.com
did you try 0x0020 or 32 instead of ES_PASSWORD ?

Hans Payer wrote:
> It looks like it could do the trick. but there's not much reference in
> the SDK. I got this so far by guessing but the 3rd line fails
>
> item = layout.AddItem("password", "", "dscontrol")
> item.SetAttribute( "Class", "Edit" )
> item.SetAttribute( "siUIStyle", "ES_PASSWORD")
>
> I also tried:
> item.SetAttribute( "Caption", "ES_PASSWORD") #doesn't fail but the
> ES_PASSWORD doesn't do anything
> item.SetAttribute( "Caption", "ES_PASSWORD= 1") #same
> item.SetAttribute( "Caption", ";ES_PASSWORD= 1") #same
>
> Any tips where I can find dscontrol info? Google isn't giving me much.
>
>
> On Tue, Nov 24, 2009 at 11:50 AM, Stephen Blair
> <Stephe...@autodesk.com <mailto:Stephe...@autodesk.com>> wrote:
>
> Maybe you could use dscontrol with the ES_PASSWORD style?
>
> Search the sdk doc for dscontrol.
>
> Stephen Blair
> Product Support Team Lead, Softimage
> Montreal, Quebec, Canada
> Blog<http://xsisupport.wordpress.com/> |
> KB<http://autodesk.com/softimage-support> |
> Wiki<http://autodesk.com/softimage-kb>
>
> If you would like to comment on my work, please contact my manager
> chris....@autodesk.com

> <mailto:chris....@autodesk.com><mailto:sy.do...@autodesk.com

Guillaume Laferriere

unread,
Nov 24, 2009, 4:40:51 PM11/24/09
to soft...@listproc.autodesk.com
I think this is an enum value from Microsoft in c:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\WinUser.h.
Try to use the actual integer values.
* Edit Control Styles
*/
#define ES_LEFT 0x0000L
#define ES_CENTER 0x0001L
#define ES_RIGHT 0x0002L
#define ES_MULTILINE 0x0004L
#define ES_UPPERCASE 0x0008L
#define ES_LOWERCASE 0x0010L
#define ES_PASSWORD 0x0020L
#define ES_AUTOVSCROLL 0x0040L
#define ES_AUTOHSCROLL 0x0080L
#define ES_NOHIDESEL 0x0100L
#define ES_OEMCONVERT 0x0400L
#define ES_READONLY 0x0800L
#define ES_WANTRETURN 0x1000L
#if(WINVER >= 0x0400)
#define ES_NUMBER 0x2000L
#endif /* WINVER >= 0x0400 */

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Hans Payer
Sent: November-24-09 4:36 PM
To: soft...@listproc.autodesk.com
Subject: Re: PPG with star password input?

It looks like it could do the trick. but there's not much reference in the SDK. I got this so far by guessing but the 3rd line fails

item = layout.AddItem("password", "", "dscontrol")
item.SetAttribute( "Class", "Edit" )
item.SetAttribute( "siUIStyle", "ES_PASSWORD")

I also tried:
item.SetAttribute( "Caption", "ES_PASSWORD") #doesn't fail but the ES_PASSWORD doesn't do anything
item.SetAttribute( "Caption", "ES_PASSWORD= 1") #same
item.SetAttribute( "Caption", ";ES_PASSWORD= 1") #same

Any tips where I can find dscontrol info? Google isn't giving me much.

On Tue, Nov 24, 2009 at 11:50 AM, Stephen Blair <Stephe...@autodesk.com<mailto:Stephe...@autodesk.com>> wrote:
Maybe you could use dscontrol with the ES_PASSWORD style?

Search the sdk doc for dscontrol.

Stephen Blair
Product Support Team Lead, Softimage
Montreal, Quebec, Canada
Blog<http://xsisupport.wordpress.com/> | KB<http://autodesk.com/softimage-support> | Wiki<http://autodesk.com/softimage-kb>

If you would like to comment on my work, please contact my manager chris....@autodesk.com<mailto:chris....@autodesk.com><mailto:sy.do...@autodesk.com<mailto:sy.do...@autodesk.com>>.


Autodesk Subscription<http://www.autodesk.com/subscription> The smartest way to optimize your software investment.

winmail.dat

Hans Payer

unread,
Nov 24, 2009, 4:44:53 PM11/24/09
to soft...@listproc.autodesk.com
You guys rocks!!!!

item.SetAttribute( "Style", 32)   #worked

MERCI!

Matt Lind

unread,
Nov 24, 2009, 4:49:15 PM11/24/09
to soft...@listproc.autodesk.com
Here's a simple example:
 
 
var ES_PASSWORD = 32;
 
RequestPassword();
 
function RequestPassword( )
{
        // Create CustomProperty
        var oCustomProperty = XSIFactory.CreateObject( "CustomProperty" );
 
        // Add Parameter(s) to the custom property
        oCustomProperty.AddParameter( "password", siString, siClassifUnknown, siSilent, "", "", "", "", 0, 1, 0, 1 );
 
        // PPG Layout
        oLayout = oCustomProperty.PPGLayout;
        oLayout.Clear();
        var oItem = oLayout.AddItem( "password", "Password", siControlEdit );
        oItem.SetAttribute( siUIStyle, ES_PASSWORD );
 
        // Display PPG to user
        try {
                InspectObj( oCustomProperty, null, "PPG Name", siModal );
        } catch(e) {
                return;
        }
 
        // Get value entered by user
        var Password = oCustomProperty.Parameters( "password" ).value;
       
        // Display result
        LogMessage( "Password: " + Password );
       
        return(0);
}
 
 
 
Matt
 
 
 
 
________________________________
 
        Sent: Tuesday, November 24, 2009 1:36 PM

Robert Moodie

unread,
Nov 24, 2009, 5:03:19 PM11/24/09
to soft...@listproc.autodesk.com
Don't forget to turn off command logging - look in the bottom left hand corner of the screen when you press OK.
 
 
 
        Any tips where I can find dscontrol info? Google isn't giving me much..

Hans Payer

unread,
Nov 24, 2009, 5:05:39 PM11/24/09
to soft...@listproc.autodesk.com
Of course!!!!!! Thanks!
Reply all
Reply to author
Forward
0 new messages