John,
> put url("file:users.txt") into tUserFile
Since you have read the entire file into memory you might also try filter
filter tUserFile with “tUsername,*”
if it’s empty then the name is unique.
You may be able to speed up subsequent searches by sorting the contents of the
file befo
Ok, FWIW, this appears to work:
Thanks for the prodding Peter :)
John Patten
SUSD
On Jul 31, 2014, at 6:50 PM, JOHN PATTEN wrote:
> If I uncomment the repeat, the “Sorry, username already in use…" message does
> not get triggered. It just activates the script following the “else”
> stateme
If I uncomment the repeat, the “Sorry, username already in use…" message does
not get triggered. It just activates the script following the “else” statement
when using a duplicate username.
The only time it works is if it is the first username in my csv text list is
entered into the field to cr
Do you still have the comment at the start of the exit repeat line?
> --exit repeat
Regards
Peter
On 1 Aug 2014, at 09:15, JOHN PATTEN wrote:
> Oops! Yes, I had forgotten to rename that variable. That helps.
>
> However, even when it identifies a duplicate it still allows the script
> be
Oops! Yes, I had forgotten to rename that variable. That helps.
However, even when it identifies a duplicate it still allows the script beyond
the “else “ to execute. Plus, depending on what line the duplicate username is
located in my csv file, it loops that many times.
So if username “John
To: How to use LiveCode
There seems to be a typo in your code:
> repeat for each line thisLine in tUserFile
>
> if item 1 of tLine is tUsername then
I think that should be item 1 of thisLine
Regards
Peter
___
use-livecode mailing list
use-liveco
Hi All,
I’m experimenting with LiveCode server. Trying to get my head around some of
the challenges of scripting on the server. I’ve come up with one I’m a bit
stuck on.
I have a four line csv text file on server consisting of username, password,
and email. i.e. jdoe, password, j...@bmail.com