Back |
ScriptingMI-SUGAR supports the following AppleScript commands: analyze, plot and export. The first command runs the analysis for a specified document, the second command opens the plotter to show the analysis results, and the third command exports the analysis results to either MathML, Matlab® or tabular text format. The plot and export commands must be issued after the analyze command. Here is an example script which demonstrates how to use all three commands: tell application "MI-SUGAR" open file "Primary:Users:johndoe:myCircuit.cir" analyze document "myCircuit.cir" plot document "myCircuit.cir" export document "myCircuit.cir" format "MathML" file "/Users/johndoe/results" end tell As can be seen, the export command has two arguments: The target format ("MathML", "Matlab" or "Tabular") and the path to the target file. The extension of the file needn't be specified, it will be appended automatically. Please let me know if you would like me to make a specific task scriptable. |