Overview

 

SmartBatch provides a convenient way to manage your automation programs and scripts.  The syntax highlighting code editor can be used with any language but has direct syntax highlighting support for the following languages:

batch files
C#
Java
 JScript
 Perl
 PHP
 PowerShell
 Python
 VB.NET
 VBScript
 XML

Additional support is provided for both C# and VB.NET.  With these two languages you can edit the code with syntax highlighting and intellisence support.  This helps navigate the .NET class library to make it easier for you to write your code.  Complication to a .exe is also provide for both languages.

The following pictures shows the SmartBatch Code Editor window. You can click on "hot spot" areas in each picture below to get detailed information about buttons, controls and fields.

Code Editor

Shows the Code Editor. The Editor is used to edit the source code associated with your Operations in SmartBatch. For C# and VB.NET you can also compile your code into a .NET executable. The executable file can be run on any computer where the .NET Framework is installed. You can interact with the SmartBatch API with the code the you write. Examples are provided under the folder where SmartBatch is installed:

Samples\ExampleConsolePrograms

Click here to view the SmartBatch API.

 

You will find examples of how to write simple .NET console programs in the folder where SmartBatch is installed under:

Samples\ExampleConsolePrograms

Compiling Code (VB.NET or C#)

VB.NET and C# have references to class libraries.  The compiler must know about these references (name and location of the dll files) so your code can be compiled with no errors.  Use the Reference tab in the lower pane of the Code Editor to configure the necessary references.  The .dll reference files must exist in the bin folder where the executable is created. This bin folder will be created where the source file exists.  Any .dll files that are not in the Global Assembly Cache (GAC) must be copied to the bin folder.  This includes the OnLineToolWorks.*.dll files required if your code is accessing the SmartBatch API.

After you have written your code and have configured your references, click the Build button or from the top level menu select Build and Build/Compile Code.  Any errors are reported in the lower (Build) pane.