Password Field
Yves COPPE
yvescoppe at skynet.be
Mon Apr 12 12:38:35 EDT 2004
Le 12-avr.-04, à 17:30, Dan Friedman a écrit :
> Good morning!
>
> Does anyone have a routine for typing in a field and displaying
> bullets -
> but preserving the text? As if it was a password field. I am making
> a user
> login window with "Username" and "Password" fields. Don't you think
> the
> "password" field should display bullets (or asterisks)? I could write
> it
> myself... But I figured someone out there has done this already. :)
>
> Thanks!
> Dan
>
>
I have in my main stack a field named "Pass" with this script in the
fld
local thisPassword
on returninfield
get thisPassword
if it is <whatever>" then
go to stack <whatever>
else
answer "Invalid password !"
end if
close this stack
end returninfield
on enterinfield
returninfield
end enterinfield
on keydown whichKey
put whichKey after thisPassword
put "*" after field "pass" --asterisk or whatever another char you
want
end keyDown
on backspaceKey
put empty into field "pass"
put "" into thisPassword
end backspaceKey
on deleteKey
put empty into field "pass"
put "" into thisPassword
end deleteKey
hope this helps
Greetings.
Yves COPPE
yvescoppe at skynet.be
More information about the use-livecode
mailing list