Password Field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 246
- Joined: Tue Jun 30, 2009 11:15 pm
Password Field
Hello again.
I am sorting out my logon system and would just like to know how to use the ImageSource property to change the character inputted into the field to a bullet, I tried a stack before which trapped the RawKeyDown and KeyDown messages and places the character into a separate property but doesn't quite work if I paste a value into the field.
So if someone could give me a hand, I would really appreciate it, I found something which did it before but the hard drive packed in afterward and the favourite link vanished.
Thanks, Michael.
I am sorting out my logon system and would just like to know how to use the ImageSource property to change the character inputted into the field to a bullet, I tried a stack before which trapped the RawKeyDown and KeyDown messages and places the character into a separate property but doesn't quite work if I paste a value into the field.
So if someone could give me a hand, I would really appreciate it, I found something which did it before but the hard drive packed in afterward and the favourite link vanished.
Thanks, Michael.
Re: Password Field
By all means use the imageSource for a fancier bullet if desired (either put a character after the field text and then set the imagesource of the last char to your image, or use htmlText) but it's also possible to use a text bullet character, and many password fields out there in the software and web word simply use asterisks, so that might make your job a lot easier.
Best wishes,
Curry Kenworthy
LiveCode Development, Training & Consulting
http://livecodeconsulting.com/
WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/
Curry Kenworthy
LiveCode Development, Training & Consulting
http://livecodeconsulting.com/
WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/
Re: Password Field
Hi Michael,
You will find a complete password widget here. Just scroll down a little bit.
Best regards,
Mark
You will find a complete password widget here. Just scroll down a little bit.
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 246
- Joined: Tue Jun 30, 2009 11:15 pm
Re: Password Field
Ah thank you Mark. 

Re: Password Field
Hi, I recentely got the same problem. This is how I solved it. The following script is in the password input field:
on KeyUp
repeat with x = 1 to the number of chars of me
set the imageSource of char x of me to "bullet"
end repeat
pass KeyUp
end KeyUp
on pasteKey
paste
repeat with x = 1 to the number of chars of me
set the imageSource of char x of me to "bullet"
end repeat
end pasteKey
(where "bullet" is the name of an imported image resource).
on KeyUp
repeat with x = 1 to the number of chars of me
set the imageSource of char x of me to "bullet"
end repeat
pass KeyUp
end KeyUp
on pasteKey
paste
repeat with x = 1 to the number of chars of me
set the imageSource of char x of me to "bullet"
end repeat
end pasteKey
(where "bullet" is the name of an imported image resource).
Re: Password Field
why not using numtochar(165) for the bullet char?
edit: this is how i fake the password field on the iphone ios
i use two field, one with the "bulletted" text and another that stores the clear text (fld "password")
after two seconds the last key pressed the last char in the field is "crypted" just like in the ios appears
the image "x autore" is a little white x in a gray circle, as in the text field of the iphone
on mouseup
set the locktext of fld "username" to true
set the locktext of me to false
put "" into me
select the text of me
put "" into fld "password"
end mouseup
on openfield
put "" into me
hide image "x autore"
end openfield
global idletime
on keyup
show image "x autore"
put last char of me after fld "password"
if (number of chars of me > 1) then put numtochar(165) into char ((number of chars of me)-1) of me
select after last char of me
global idletime
put the seconds into idletime
end keyup
on idle
if the locktext of me = true then exit idle
if (me) = "" then exit idle
put the seconds - idletime into pausa
if pausa = 1 then
put the seconds into idletime
put last char of me after fld "password"
put numtochar(165) into last char of me
end if
end idle
edit: this is how i fake the password field on the iphone ios
i use two field, one with the "bulletted" text and another that stores the clear text (fld "password")
after two seconds the last key pressed the last char in the field is "crypted" just like in the ios appears
the image "x autore" is a little white x in a gray circle, as in the text field of the iphone
on mouseup
set the locktext of fld "username" to true
set the locktext of me to false
put "" into me
select the text of me
put "" into fld "password"
end mouseup
on openfield
put "" into me
hide image "x autore"
end openfield
global idletime
on keyup
show image "x autore"
put last char of me after fld "password"
if (number of chars of me > 1) then put numtochar(165) into char ((number of chars of me)-1) of me
select after last char of me
global idletime
put the seconds into idletime
end keyup
on idle
if the locktext of me = true then exit idle
if (me) = "" then exit idle
put the seconds - idletime into pausa
if pausa = 1 then
put the seconds into idletime
put last char of me after fld "password"
put numtochar(165) into last char of me
end if
end idle
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it
proudly hypertalking since 1989
proudly hypertalking since 1989
Re: Password Field
numchar(165) is a pretty good idea, thanks!
I tried your script. It works generally fine but I think it has some slight issues, though.
If you type fast, very fast, some chars won't be crypted (I'm running the application on a desktop environment, not on the iphone).
If you paste a string, instead of typing it char by char, it won't be crypted as well (as originally noticed by the author of the thread).
I tried your script. It works generally fine but I think it has some slight issues, though.
If you type fast, very fast, some chars won't be crypted (I'm running the application on a desktop environment, not on the iphone).
If you paste a string, instead of typing it char by char, it won't be crypted as well (as originally noticed by the author of the thread).
Re: Password Field
Hi,
It is really difficult to make a really good password field. I worked on mine for several months and it is still not perfect, but it is good enough for use in commercial products. See the link I provided earlier.
If you don't want to donate for the password field, then I think using imageSource is the best alternative, because it avoids having to deal with all kinds of possible user actions.
Kind regards,
Mark
It is really difficult to make a really good password field. I worked on mine for several months and it is still not perfect, but it is good enough for use in commercial products. See the link I provided earlier.
If you don't want to donate for the password field, then I think using imageSource is the best alternative, because it avoids having to deal with all kinds of possible user actions.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Password Field
good point regarding the "paste" action
try this, in the idle handler
(i'm away from my home)
try this, in the idle handler
Code: Select all
if (number of chars of me > 1) then
repeat with i=1 to ((number of chars of me)-1
put numtochar(165) into char i of me
end repeat
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it
proudly hypertalking since 1989
proudly hypertalking since 1989
Re: Password Field
update field
pasting text on it doesn't work
enjoy it
pasting text on it doesn't work
enjoy it

- Attachments
-
- password.livecode.zip
- (5.41 KiB) Downloaded 652 times
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it
proudly hypertalking since 1989
proudly hypertalking since 1989
Re: Password Field
iOS input fields have a built-in password option. It might be easier to use that on mobile.
On desktop, I prefer the imagesource solution. It lets you read the text directly without having to store it somewhere else, and it's relatively easy to implement.
On desktop, I prefer the imagesource solution. It lets you read the text directly without having to store it somewhere else, and it's relatively easy to implement.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com