HOW to unseen Password when user is typing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
HOW to unseen Password when user is typing
Hi,all!
When user is entering password, I'd like to make what user types as ****** so that it wouldn't be seen by others.
What should I do to achieve this?
Besides,when the keyboard on iPhone comes out, it might cover the lines that the user is currently typing therefore user can't see what he has typed.
How to solve this problem?
Thanks!
I am completely new to LiveCode and want to make some apps by myself to impress my friend.
Michael
When user is entering password, I'd like to make what user types as ****** so that it wouldn't be seen by others.
What should I do to achieve this?
Besides,when the keyboard on iPhone comes out, it might cover the lines that the user is currently typing therefore user can't see what he has typed.
How to solve this problem?
Thanks!
I am completely new to LiveCode and want to make some apps by myself to impress my friend.
Michael
Re: HOW to unseen Password when user is typing
Hi Michael,
For the first question look up "keyDown" in the dictionary.
It's a fun exercise, but if you need more help just ask again.
The second question is solved by:
put the effective working screenRect into tRect
tRect now contains the viewable screen area, you use that to re-position your field.
Simon
For the first question look up "keyDown" in the dictionary.
It's a fun exercise, but if you need more help just ask again.
The second question is solved by:
put the effective working screenRect into tRect
tRect now contains the viewable screen area, you use that to re-position your field.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 10062
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: HOW to unseen Password when user is typing
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: HOW to unseen Password when user is typing
Thanks, Simon.Simon wrote:Hi Michael,
For the first question look up "keyDown" in the dictionary.
It's a fun exercise, but if you need more help just ask again.
The second question is solved by:
put the effective working screenRect into tRect
tRect now contains the viewable screen area, you use that to re-position your field.
Simon
The second question, what do you mean? Should I put the sentence into script or what?
I am a noobie, sorry, I only understand the front-end work, not the coding part.
Re: HOW to unseen Password when user is typing
It seems the password there is about to teach you how to give stack a password. Not how to unseen some text... But thanks anyways...FourthWorld wrote:ask password
http://livecode.com/developers/api/6.0. ... 0password/
Re: HOW to unseen Password when user is typing
Richards answer solved both for you in 1 go. 
Simon

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: HOW to unseen Password when user is typing
All right. I see "ask password" this time.Simon wrote:Richards answer solved both for you in 1 go.
Simon
But what do I write in the script to make this field ****
I tried ask password of Field "Password"
It doesnt work...
Last edited by ECNU4271 on Sun Aug 25, 2013 12:54 am, edited 1 time in total.
Re: HOW to unseen Password when user is typing
It's "ask password"
Just put that in a button you'll see.
Simon
Code: Select all
on mouseUp
ask password "Please enter the administrator password."
if it is empty then exit to top
if it = the uPassword of this stack then --uPassword contains the correct password
# right password; proceed
else
# incorrect password
answer "Incorrect password. Please try again."
end if
end mouseUp
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: HOW to unseen Password when user is typing
Simon wrote:It's "ask password"Just put that in a button you'll see.Code: Select all
on mouseUp ask password "Please enter the administrator password." if it is empty then exit to top if it = the uPassword of this stack then --uPassword contains the correct password # right password; proceed else # incorrect password answer "Incorrect password. Please try again." end if end mouseUp
Simon
Thanks Simon.
I tried. It works very well if there is only an admin needs to log in.
The field appears in the Register page. So the password field, I want it to be unseen. not the button or verification.
Same as the password field in the Login page.
How would this work?
Michael
Re: HOW to unseen Password when user is typing
Not sure I follow you.
Are you asking about the first time someone writes their password?
Are you asking about the first time someone writes their password?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: HOW to unseen Password when user is typing
Yeah, when a user wants to sign up, he needs to enter the password, that's where I want the information unseen.Simon wrote:Not sure I follow you.
Are you asking about the first time someone writes their password?
Michael
Re: HOW to unseen Password when user is typing
Use the same ask password in the code but instead of "if it =" use "put it somewhere". (somewhere is not a LC function, it's just a var or field or file, you choose (Wow the trouble with an English-like language))
The "it" variable contains anything they typed.
Do you know how to to use "breakpoint" and step through the code? Breakpoint allows you to watch what is happening in the variable watcher when each line executes. I only add this because I figure you ran the code but never saw what was happening.
Simon
The "it" variable contains anything they typed.
Do you know how to to use "breakpoint" and step through the code? Breakpoint allows you to watch what is happening in the variable watcher when each line executes. I only add this because I figure you ran the code but never saw what was happening.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: HOW to unseen Password when user is typing
OK, I understand what you mean. But the password should be on a blank that needs to be filled in. (Like this: Password: ______)Simon wrote:Use the same ask password in the code but instead of "if it =" use "put it somewhere". (somewhere is not a LC function, it's just a var or field or file, you choose (Wow the trouble with an English-like language))
The "it" variable contains anything they typed.
Do you know how to to use "breakpoint" and step through the code? Breakpoint allows you to watch what is happening in the variable watcher when each line executes. I only add this because I figure you ran the code but never saw what was happening.
Simon
There is no button, how can I make use of mouseUp anyway?
Michael
Re: HOW to unseen Password when user is typing
Hey Michael,
I'm guessing English is not your first language? No problem, but this will take longer. (Do you use an online translator, would be cool to see how good they are translating to English).
You are building a registration form that has a few fields that need filling out (e.g. first name, last name, phone) and in that you want to allow the user to enter a password?
With that I see how "ask password" is not like other registration forms, but it can be used on subsequent visits.
If that is the case then again look up "keydown" in the dictionary. You intercept the keydown and replace it with "*" in your password field. Please try it first using a breakpoint and step through the code, see if you can figure it out.
The keyboard covering up the field is another problem, one thing at a time.
Simon
I'm guessing English is not your first language? No problem, but this will take longer. (Do you use an online translator, would be cool to see how good they are translating to English).
You are building a registration form that has a few fields that need filling out (e.g. first name, last name, phone) and in that you want to allow the user to enter a password?
With that I see how "ask password" is not like other registration forms, but it can be used on subsequent visits.
If that is the case then again look up "keydown" in the dictionary. You intercept the keydown and replace it with "*" in your password field. Please try it first using a breakpoint and step through the code, see if you can figure it out.
The keyboard covering up the field is another problem, one thing at a time.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: HOW to unseen Password when user is typing
Thanks for your kind understanding, Simon!Simon wrote:Hey Michael,
I'm guessing English is not your first language? No problem, but this will take longer. (Do you use an online translator, would be cool to see how good they are translating to English).
You are building a registration form that has a few fields that need filling out (e.g. first name, last name, phone) and in that you want to allow the user to enter a password?
With that I see how "ask password" is not like other registration forms, but it can be used on subsequent visits.
If that is the case then again look up "keydown" in the dictionary. You intercept the keydown and replace it with "*" in your password field. Please try it first using a breakpoint and step through the code, see if you can figure it out.
The keyboard covering up the field is another problem, one thing at a time.
Simon
I tried
on keyDown
intercept the keydown and replace it with "*" in field "password"
end keyDown
Obviously, error at line2...