home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1998 #11 / PCDIREKT_1198.bin / SHOWDATA / KONFIG.DXR / 00008.ls < prev    next >
Encoding:
Text File  |  1997-07-31  |  1.1 KB  |  31 lines

  1. on testchars
  2.   global PassW, ScreenN, gPW
  3.   set PassW to gPW
  4.   set ScreenN to the text of field "AOLNAME"
  5.   set excludelist to ["├ñ", "├╢", "├╝", "├ƒ"]
  6.   repeat with i in excludelist
  7.     if ScreenN & PassW contains i then
  8.       return 0
  9.     end if
  10.   end repeat
  11.   repeat while ScreenN & PassW contains " "
  12.     if char 1 of ScreenN = " " then
  13.       set ScreenN to char 2 to the number of chars in ScreenN of ScreenN
  14.       next repeat
  15.     end if
  16.     if char 1 of PassW = " " then
  17.       set PassW to char 2 to the number of chars in PassW of PassW
  18.       next repeat
  19.     end if
  20.     if ScreenN contains " " then
  21.       set offs to offset(" ", ScreenN)
  22.       set ScreenN to char 1 to offs - 1 of ScreenN & char offs + 1 to the number of chars in ScreenN of ScreenN
  23.     end if
  24.     if PassW contains " " then
  25.       set offs to offset(" ", PassW)
  26.       set PassW to char 1 to offs - 1 of PassW & char offs + 1 to the number of chars in PassW of PassW
  27.     end if
  28.   end repeat
  29.   return (the number of chars in ScreenN >= 3) and (the number of chars in ScreenN <= 10) and (the number of chars in PassW >= 4) and (the number of chars in PassW <= 8)
  30. end
  31.