External Access
Igor Pro can act as a server -- accepting commands and data from a client program and returning results, as a client -- sending commands and data to a server program, or as both at the same time. The methods used depend on the platform:
Windows
Igor can play the role of an ActiveX Automation server but not an Automation client. However it is possible to generate script files that allow Igor to indirectly play the role of client.
On Windows, Igor also supports the older Dynamic Data Exchange (DDE) method and can be a DDE server or DDE client.
Also on Windows, you can control IGOR from a Windows batch file and you can execute batch files or perform Windows command line operations using the ExecuteScriptText operation.
Macintosh
On Macintosh, IGOR can be controlled by another program using AppleEvents. Because IGOR is completely programmable using its command line, it is a simple matter to control IGOR using primarily the Do Script event.
Igor also supports the creation and execution of simple AppleScripts in order to send commands to other programs using the ExecuteScriptText operation.
Both Macintosh and Windows
The FTPDownload and FTPUpload command line operations support simple transfers of files and directories over the Internet using the FTP protocol. FTPDownload makes it possible to write an Igor procedure that automatically retrieves data from a remote FTP server. FTPUpload makes it possible to transfer results to a remote FTP server.
Since Igor's SaveNotebook operation can generate HTML files from notebooks, it is possible to write an Igor procedure that downloads data, analyzes it, graphs it, and uploads an HTML file to a directory used by a web server. You can then use the BrowseURL operation to verify that everything worked as expected.
IGOR also supports a batch file feature that, while primitive compared to ActiveX Automation or AppleEvents, is very simple to implement and is sufficient for many situations.
Another way to access another program or data is by writing a special purpose code module called an XOP (eXternal OPeration.) See the XOP Toolkit section for details.
Igor as a WWW CGI-Bin Server
You can use Igor Pro as part of a web server on both Macintosh and Windows. For example, you might create a form that allows users to enter parameters and then see an Igor created graph based on the user's inputs.
On the Macintosh your web server executes a compiled AppleScript (that you write based on our example) that communicates with Igor using the DoScript Apple event.
On Windows, we supply an IgorCGI.exe executable program than communicates with Igor using DDE.
On both platforms, we provide example procedures that you keep in the Igor Procedures folder to help you decode the values users enter in the form with their web browser.
Last updated: Wednesday, December 22, 2004