home *** CD-ROM | disk | FTP | other *** search
/ GU Photo: Background 3 / GU.iso / pc / browser_4m_ / browser_4m_.dxr / 00132_keyBoard.ls < prev    next >
Encoding:
Text File  |  1994-09-30  |  535 b   |  23 lines

  1. on keyDown
  2.   finishautoview()
  3.   set k to the key
  4.   if "0123456789" contains k then
  5.     if the number of chars in field "search" < 3 then
  6.       put k after field "search"
  7.     end if
  8.   else
  9.     if BACKSPACE contains k then
  10.       set n to the number of chars in field "search" - 1
  11.       if 0 < n then
  12.         put char 1 to n of field "search" into field "search"
  13.       else
  14.         put EMPTY into field "search"
  15.       end if
  16.     else
  17.       if "□" contains k then
  18.         put EMPTY into field "search"
  19.       end if
  20.     end if
  21.   end if
  22. end
  23.