Interoperability and Front-Ends

One of LiveCode’s greatest strengths is its strong support for operating with other applications as a front-end or a component within a multi-tiered system. We’ve provided a comprehensive set of options for different methods of interacting with other applications, processes, computers or devices. We’ve brought our high-level English-like syntax to all aspects of our interoperability feature set, allowing you to access information starting with just one line of code.

Internet Protocol Support

Support for standard Internet protocols is built in. Access http, https, ftp, and http post URLs starting from one line of code. For example, to download an image from the Web and render it into an image object in your application:

put URL “http://www.xyz.com/image.jpg” into image “Viewer”

Ftp commands include syntax to download and upload files, list directories or execute ftp commands.

Https support is implemented using OpenSSL.

All our protocol support is implemented as a library written in LiveCode using the LiveCode engine’s underlying socket support. Because the library is written in LiveCode it is possible to edit it, e.g. to copy the code or add features.

Interprocess Communication

Support is built-in for launching other applications, launching documents, opening processes, reading and written to other processes, or executing shell commands. The interprocess communication feature set makes it easy to interact with other applications or processes running on the same machine.

For example, to load a Web browser with a URL:

launch URL “http://www.runrev.com/”

Or to execute a shell command:

put shell(“ls –F”)

Processes can be executed as slaves, making it straightforward to run another process and poll for input and output over stdin/stdout. You can launch an application with elevated permissions (which will cause the OS to request that the user authenticate).

Custom Protocol Support

LiveCode has full support for sockets, meaning you can implement any standard protocol or implement your own easily. Socket communication starts from just a few lines of code. For example, to begin accepting connections on a port with a message whenever data has been received:

accept connections on port 1987 with message chatMessage

And to intercept the corresponding message that is generated:

on chatMessage s

  read from socket s with message chatMessage

end chatMessage

LiveCode’s standard Internet protocol support has been implemented in LiveCode using the socket feature set.

SQL Database Access

For details on our SQL Database support, please see this page.

File System Access

Full support is included for accessing the file system. Files which fit in memory can be accessed using the URL commands, allowing you to extract or append information with a single line of code. For example, to insert some text at the end of the second line in a file:

put “More text” after line 2 of URL “file:/myfile.txt”

There are a set of file commands for reading, writing and seeking through large files.

Encoding and Decoding

Support is included for encoding and decoding files and data in a number of formats. These include ZIP, GZIP, base64, and Unicode. You can encode and decode data in these formats,  or work with ZIP archives. For example, to compress some data in GZIP format:

put compress(tLargeData) into tLargeDataCompressed

Industrial Strength Encryption

LiveCode leverages OpenSSL to provide support for a wide range of industry standard cryptography. You can encrypt and decrypt data using symmetric ciphers, utilize public key cryptography including RSA encryption, decryption, verification and signing, generate cryptographic hashes including MD5 digest, SHA-1 digest and cryptographic quality random data, transmit data securely using https.

OS Scripting

Operate with other script aware applications using LiveCode’s OS scripting feaures. Execute and return data from AppleScripts, send and receive messages using appleEvents and executed and return data from the Windows Script Host.

Native code externals

Augment your application by calling code libraries written in lower level languages. Externals can access the contents of variables, set the contents of variables in the current context, access arrays, and send messages to current card.

Serial Ports

Read and write to the serial ports to control devices.

Next Workgroups and Teams