Simulating password entry

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Fri Aug 20 09:27:04 EDT 2004


Devin,

Your final script is WONDERFUL! I only made a slight modification to make 
it more X-platform, On windows, ascii 165 looks kinda like a chicken 
footprint. Also, the default font apparently doesn't contain the bullet 
character on Win. I changed the font in the script, but of course that 
could be moved to preOpenStack so it only happens once. Anyways, here is 
what I changed/added.

switch (the platform)
  case "MacOS"
    put numtochar(165) after char eChar of me
    break
  case "Win32"
    set the textFont of me to "Arial Black"
    set the textSize of me to "12"
    put numtochar(149) after char eChar of me
    break
end switch

Kind regards,
Roger Eller  <roger.e.eller at sealedair.com>

> Thanks to all who sent suggestions. Here's what I came up with (beware
> line wraps):
> 
> global passwd
> 
> on keydown whichKey
> put word 2 of the selectedChunk of me into sChar
> put word 4 of the selectedChunk of me into eChar
> if eChar > sChar then -- some text is selected
> delete char sChar to eChar of me
> delete char sChar to eChar of passwd
> end if
> put word 2 of the selectedChunk of me into sChar
> put word 4 of the selectedChunk of me into eChar
> put whichKey after char eChar of passwd
> put numtochar(165) after char eChar of me
> end keyDown
> 
> on backspaceKey
> put word 2 of the selectedChunk of me into sChar
> put word 4 of the selectedChunk of me into eChar
> if eChar > sChar then -- text is selected
> delete char sChar to eChar of me
> delete char sChar to eChar of passwd
> else
> delete char eChar of me
> delete char eChar of passwd
> end if
> end backspaceKey
> 
> on deleteKey
> put word 2 of the selectedChunk of me into sChar
> put word 4 of the selectedChunk of me into eChar
> if eChar > sChar then -- text is selected
> delete char sChar to eChar of me
> delete char sChar to eChar of passwd
> else
> delete char eChar of me
> delete char eChar of passwd
> end if
> end deleteKey
> 
> on returnInField
> click at the loc of btn "connect"
> end returnInField
> 
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University



More information about the use-livecode mailing list