I read an install guide that suggested trying a basic file from the command line just to check it was working. The file would contain the LC code within <?lc and ?> tags. Having figured out how to get line endings that worked on a Mac, I was able to pass the script file to the LiveCode Server executable and get the expected output. I then had an idea and tried the following:-
Code: Select all
#!/usr/local/bin/livecode-server
set the outputLineEndings to "lf"
put "Hello World!" & return & the date && the time & return
Make this script file executable and run it. This actually works perfectly and I think is a really handy way to be able to use LiveCode for testing and even general scripting purposes.
Now if this has all been done before and is now old hat, I apologise. Otherwise, I think it's pretty cool.