Loading and saving external data
In many applications you will want to keep track of changes that the user has made. There are several ways to do that with LiveCode, including querying of a URL, reading and writing to a text file, and saving data inside a stack.
Querying a URL
Quite often web-based applications will load and save data from server side scripts. That can be done with LiveCode apps too. Here's an example, where we want to know what the closing price was for Google yesterday:
put url "http://quote.yahoo.com/d/quotes.csv?s=GOOG&f=p"
At the moment that line was tested, 609.46 appeared in the Message Box:
Who knows what you'll find when you try it!
As with any such calls to an online service there is a chance that it may take some time to return the value, and in the above example LiveCode would be blocked from doing anything else until the data was returned. An alternate approach would be to load the URL in order to cache it, and then display the results when it is cached. LiveCode...