If it equals?

Klaus Major klaus.major at metascape.org
Fri Aug 23 02:11:01 EDT 2002

Hi Josh,

looks like that was not our day ;-)

> Hello,
>     Found out that it is Not searching all of the lines. Here is the 
> script.
> on mouseup
>   put URL "file:\\ZZYZX\INTERFACE\Names.txt" into fld "NamePass"
>   set the itemdel to TAB
>   put fld "NamePass" into the_file
>   put empty into fld "NamePass"
>   ask "Please enter your Registered Alias"
>   if it is empty then exit mouseup
>   put it into the_user
>   repeat for each line l in the_file
>     if item 1 of l is the_user then
>       put item 2 of 1 into the_password
>       exit repeat
  ###   else
  ###     answer "Sorry, that Name is not in the User Database. Pelase 
###your spelling"
     ###  exit mouseup
  ###   end if
>   end repeat
     ##  now add this:
      if the_password is empty then ## no user no password
         answer "yaddayadda"
         exit mouseup
      end if
>   ask password "Please enter your Case Senstive Password"
>   if it is the_password then
>     put "Logged In As: " & the_user into fld "LOG"
>     hide me
>     show btn "LOG OFF"
>     send RateM to this stack
>     enable btn "Games"
>     Play "Welcome.wav"
>   else
>     answer "Sorry, the Entered Password was Incorrect. Pelase try 
> again" &
> Return & "If you feel this has come to you in Error, Please remember 
> that
> the Passwords are Case Senstive."
>   end if
> end mouseup
> It works. But, it is not searching all of the lines. It only works for 
> the
> first line. Any ideas how to get it to search all of the lines?
>  - Josh Dye

hope (for me) THIS will work for you ;-)


Klaus Major
klaus.major at metascape.org

More information about the Use-livecode mailing list