bullet font

Yves COPPE yvescoppe at skynet.be
Wed Jan 12 16:09:58 EST 2005


Le 12-janv.-05, à 20:44, Hershel Fisch a écrit :

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

create your fld and that is the script of the fld :

local thisPassword
on returninfield
   get thisPassword
   if it is <your password> then
     go to stack <your substack>
   else
     answer "Password not correct"
   end if
   close stack <your main stack>
end returninfield

on enterinfield
   returninfield
end enterinfield

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 thisPassword
    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 thisPassword
    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 thisPassword
    else
      delete char eChar of me
      delete char eChar of thisPassword
    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 thisPassword
    else
      delete char eChar of me
      delete char eChar of thisPassword
    end if
end deleteKey



You can adapt it to your needs.
Greetings.

Yves COPPE
yvescoppe at skynet.be


More information about the use-livecode mailing list