bullet font

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Wed Jan 12 16:06:50 EST 2005


> Hi , is there some way to create a bullet font for passwords?
> Thanks, Hershel

Hershel,

This is not my code, but I use it and it works very well (on mac and pc). 
Someone posted this to the list a few months ago.
Roger Eller <roger.e.eller at sealedair.com>


[PUT THIS IN A BUTTON NAMED Logon]
global passwd
on mouseUp
  answer "You typed:" && passwd && "as your password, but the field only showed" && 
fld "passwd" & "."
end mouseUp


[PUT THIS IN THE SCRIPT OF A FIELD NAMED passwd]
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
  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
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 "Login"
end returnInField


More information about the use-livecode mailing list