Controlling WheelToolTM from Different Software Environments
Class WheelToolCmd is declared in WheelTool.exe as GlobalMultiUse. It has one method, Exec, which is set as default. The method accepts a string with command (or sequence of commands, separated by ";") and returns the string with result (or sequence of results, separated by ";"). In general, the syntax (in Visual Basic) to execute a command is:
<result_string> = WheelToolCmd(<command_string>)
Dim command as String, result as String
'FORM OR INPUT COMMAND STRING
'EXECUTE COMMAND
result = WheelToolCmd(command)
'ANALYZE RESULT STRING
There is no need to declare the class and to create an instance of this class, since it is GlobalMultiUse. There is no need to define method, since it is default.
Internal macro languages of ImagePro and Aphelion are flavors of MS Visual Basic. Important for us is that WheelTool must be declared, and an instance of it must be created. Following is the text that works for both packages.
Dim command As string,
result As string
Dim WTool As Object
Set WTool = CreateObject("WheelTool.WheelToolCmd")
...
'FORM OR INPUT COMMAND STRING command
'EXECUTE COMMAND
result = WTool(command)
'ANALYZE RESULT STRING result
..
Set WTool = Nothing
WTool = actxserver('WheelTool.WheelToolCmd');
...
%FORM OR INPUT COMMAND STRING command
%EXECUTE COMMAND
result = invoke(WTool, 'Exec', command); % E.g. res = invoke(LTool, 'Exec', 'F 7');
%ANALYZE RESULT STRING result
...
delete(WTool);