The Saleae Logic software's scripting API was designed to allow developers to automate different operations in the Logic software. Unfortunately, it does not provide a nice interface for reading and manipulating captured data out of the box.
To develop an application where you want to automatically capture data and then access it from your custom application, the following process has to be used.
Capture data using the CAPTURE or CAPTURE_TO_FILE commands.
Export the data using the EXPORT_DATA2 or EXPORT_ANALYER commands.
Load the exported data from disk separately into your application.
Parse the data into a usable format.
In the case of exporting analyzer results (such as I2C packets, serial data, etc.), you can skip Step 3 using an optional parameter that will stream the contents of the file over the socket as part of the response. However, the file still needs to be saved to disk, and the response still needs to be parsed since it is still in a text format.
More information about the socket API can be found here: