I am not giving you code, I am leading you to solve a problem.
When I give you code it will look like this:
Code: Select all
this you can copy and paste
Simon
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
this you can copy and paste
Sorry I was just keeping waiting for your reply and didn't realize there is a page 2.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"?Code: Select all
this you can copy and paste
Simon
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
Thanks Andrew, it works very well. Although I don't understand the process. That should hold me for a while on this issue .andrewferguson wrote:Hi Michael,
Try putting this script into your password field:
You should now have the users password stored in the global variable thePassword.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
Andrew
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