Re: serial codes
Re: serial codes
- Subject: Re: serial codes
- From: Emmanuel <email@hidden>
- Date: Sat, 17 Mar 2001 00:49:05 +0100
At 22:43 +0100 15/03/01, Jed Verity wrote:
>
>
This is the most basic way I can think of:
>
>
--begin script
>
set serialCodes to {"test", "ing", "123"}
>
>
set userEntry to text returned of (display dialog "Enter Code" default
>
answer "")
>
>
repeat with aCode in serialCodes
>
if userEntry = aCode as string then
>
return true --the user has entered a valid code
>
else
>
false --the code is wrong
>
end if
>
end repeat
>
--end script
I think that strings remain visible if you open the resource. The tool to
open the resource is ResEdit, it is free and easily available. It would be
more secure to find another way to generate the strings (such as Jed's
second script).
Emmanuel