thanks everyone for all these beautifull solutions we can find here.
So i'm new to Livecode, i have been busy with flowstone, but though there is Ruby in it, still you can't do all you want to do.
And this LiveCode seems easier than Ruby. But i'm stock with some questions, and i will not set them here all at once.
I searched a lot but can't find.
I have a simple input field. I can put in some text and when i push the button it is being saved to a local text file which i use as a kind of database (I don't want to use a real database on a server). So far so good.
Also new lines adding goes well. And reading the file in a scrolling field right after it has been saved also is working.
1. How do i get it that only email adresses can be added and nothing else?
This is the button script:
Code: Select all
on mouseUp
put field "New Email Adress" & cr before field "email list"
put field "email list" into URL ( "file:" & specialFolderPath("Documents") & slash & "emailadresses.txt" )
end mouseUp
2. how should the script be in the stack to open the text file when starting? (the first time it does not exist of course, the text file is made after first input)
i have this but its not working
Code: Select all
if exist then put URL ( "file:" & specialFolderPath("Documents") & slash & "emailadresses.txt" ) into field "List of email addresses"
