custom password dialogue

Lynch, Jonathan bnz2 at
Tue Dec 6 11:45:20 CST 2005

Very clever...

I did this with something much more complicated - storing the test in a
custom property as it is typed. Your way is better.

-----Original Message-----
From: use-revolution-bounces at
[mailto:use-revolution-bounces at] On Behalf Of Bill
Sent: Tuesday, December 06, 2005 12:13 PM
To: use-revolution at
Subject: Re: custom password dialogue


You'll need to make your own window, as the dialog presented by "ask 
password" is not customizable beyond the prompt text. But, there is no 
built-in "Password" style for fields.

Here is what I thought was a very simple solution to that:

1) Include a tiny image (such as a 10x10 pixel padlock) in your stack. I

named mine "tinyPadlock."

2) Attach this script to the field used for password entry:

on keyUp
    -- enable masking of password during entry
    lock messages
    lock screen
    repeat with i = 1 to the number of characters in me
        if the imagesource of char i of me is not "tinyPadlock" then
            set the imagesource char i of me to "tinyPadlock"
        end if
    end repeat
    unlock messages
    pass keyUp
end keyUp

This handles whatever someone might do in the field, masks their input,
still allows you to access the content of the field as if the password 
masking was not used.

I put a small sample file up on Rev Online so you can see how it works.

User: MerryOtter
Stack: Easy Passwords


use-revolution mailing list
use-revolution at
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:

More information about the use-livecode mailing list