This is just a draft, yet to be much edited.
ActiveMathLink is an ActiveX control for MathLink, which can connect to a Mathematica kernel, make the kernel evaluate a string, obtain its result from the kernel, and disconnect the link to the kernel. If a graphic command is invoked, its result can be displayed on the control.
Since it uses ActiveX technology, ActiveMathLink cannot be used in any platforms but in Windows OS.
The properties and methods of ActiveMathLink are listed below:
Property | Description |
BGColor |
Background color |
Connected |
If true, the control is connected to the kernel. |
DisplayTextColor |
Text color on the control if DisplayTextQ is true |
DisplayTextQ |
If true, the evaluation result is also displayed on the control; if false, it is not. |
Height |
Height of the control |
InitString |
Initial string to be
evaluated when a Mathematica kernel is loaded and connected |
Left |
Left position of the control |
MathIn |
Input string to be evaluated by the kernel |
MathMsg |
Message string from the kernel |
MathOut |
Output string or evaluation result |
MLParms |
Path to the kernel |
Stretch |
If true, an image is stretched to the size of the control; if false, it is not. |
Top |
Top position of the control |
Width |
Width of the control |
Method |
Description |
Connect |
Connect to the kernel |
Disconnect |
Disconnect the link |
Evaluate |
Evaluate an input string in MathIn and get a result in MathOut |
Stop |
Stop an evaluation process |
ActiveMathLink was tested with Mathematica 3.0.1.1 under Windows 98 Japanese version, and has been working all right with Visual Basic 6.0 and Internet Explorer.
ActiveMathLink is FREE! Your comments are always welcome.
Getting ActiveMathLink is quite easy if you know how to decompress LHA files:
Download the compressed file;
Decompress it;
Invoke SETUP.EXE;
Follow the messages on the screen.
Here a sample is presented to demonstrate how to use ActiveMathLink with Internet Explorer 4.0.
First, type the following HTML source code.
Note: For your convenience, this source code is included in the downloadable compressed file above. It is possible that the code does not work with Internet Explorer 3.0. If so, uncomment the section in black, use buttons instead and change the textarea name from INPUT to, say, INPUTSTR.@
<HTML>Execute the code or read it from Internet Explorer, and you get:
@Press [Connect] and the control will be connected to the kernel. Type your command in the [Input] box. Press [Evaluate], and you get its result in the [Output] box.
@Images can be displayed on the control. If you invoke a Plot command, you get a graph on the control.
@If the DisplayTextQ property is true, evaluation results are displayed also on the control.
By pressing [Disconnect], the link to the kernel is disconnected.The control cannot handle special characters and characters other than ASCII.
Visual Basic sample program gMini FrontEndh included in MathLink Developerfs Kits.