Page 2 of 2
Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 4:02 pm
by Simon
Ok, this is going to be harder than I thought.
I am not giving you code, I am leading you to solve a problem.
When I give you code it will look like this:
Again, using the variable watcher and the code from the dictionary what do you see in "theKey"?
Simon
Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 4:43 pm
by ECNU4271
Simon wrote:Ok, this is going to be harder than I thought.
I am not giving you code, I am leading you to solve a problem.
When I give you code it will look like this:
Again, using the variable watcher and the code from the dictionary what do you see in "theKey"?
Simon
Sorry I was just keeping waiting for your reply and didn't realize there is a page 2.
The examples in the dictionary,
Examples on keyDown theKey
I dont really understand what does it mean. Besides, could you please show an simple example of how to do a correct keyDown command?
Michael
Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 5:12 pm
by andrewferguson
Hi Michael,
Try putting this script into your password field:
Code: Select all
global thePassword
on textChanged
lock screen
if the text of me = empty then
put empty into thePassword
exit textChanged
end if
if the last char of me <> "*" then
put the last char of me after thePassword
delete the last char of me
put "*" after me
else
delete the last char of thePassword
end if
unlock screen
end textChanged
You should now have the users password stored in the global variable thePassword.
Andrew
Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 5:22 pm
by ECNU4271
andrewferguson wrote:Hi Michael,
Try putting this script into your password field:
Code: Select all
global thePassword
on textChanged
lock screen
if the text of me = empty then
put empty into thePassword
exit textChanged
end if
if the last char of me <> "*" then
put the last char of me after thePassword
delete the last char of me
put "*" after me
else
delete the last char of thePassword
end if
unlock screen
end textChanged
You should now have the users password stored in the global variable thePassword.
Andrew
Thanks Andrew, it works very well. Although I don't understand the process. That should hold me for a while on this issue .

Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 5:28 pm
by ECNU4271
Althougt I still don't know how to solve the "keyboard covering fields while typing" issue.....
Re: HOW to unseen Password when user is typing
Posted: Sun Aug 25, 2013 6:23 pm
by andrewferguson
Hi Michael,
Here is an updated version of the code, which now includes comments. Hopefully this will help you work it out.
Code: Select all
global thePassword --declare a variable called thePassword and make it global
on textChanged --when the text is the field has changed (the user has entered more text
lock screen --stop updating the screen so the user does not see any changes
if the text of me = empty then --if the password field has nop text in it
put empty into thePassword --put empty into thePassword variable
exit textChanged --stop this handler
end if
if the last char of me <> "*" then --if the last letter of the password field has not already been converted
put the last char of me after thePassword --add the last character to the variable thePassword
delete the last char of me --delete the actual letter in the password field and...
put "*" after me --...put a * in its place
else
delete the last char of thePassword --the user has pressed the backspace key, so delete the last letter from thePassword variable as well
end if
unlock screen --unlock the screen so the user can see changes
end textChanged
As for the problem where iPhone keyboard hides the field, I'm afraid I cannot help you as I have never written an iPhone app.
If you don't get a response on this thread any time soon, why not posting that specific question on the iOS Deployment forum?
Andrew