Run VisualBasic script directly
DigitalMicrograph - Gatan
Example script showing how a VBS script code can be created as a string variable and directly executed from a DigitalMicrograph script.
Show system IP configuration
DigitalMicrograph - Gatan
Short script showing how command prompt output can be created and read into a DigitalMicrograph script using the command line 'ipconfig.exe' as an example.
Start an external executable
DigitalMicrograph - Gatan
Mini-example of how the command LaunchExternalProcess() is used. This command can execute any external application. It provides a powerful method to access hardware outside the DigitalMicrograph environment from within DigitalMicrograph.
Use PowerShell to send email
DigitalMicrograph - Gatan
This script uses Microsoft PowerShell to send out an email. Modify the mail server variables before testing.
Print all image documents with an optional frame
DigitalMicrograph - Gatan
This automation script will print all currently shown images in page mode using the default printer setting. The script will optionally add a rectangular border to the page.
Process all images on a workspace
DigitalMicrograph - Gatan
This automation script applies a processing method to all currently open images. The script is easily modified to perform different tasks on all currently open images.
Scale all images to a given value range
DigitalMicrograph - Gatan
This script normalizes the intensity values of all open images to a defined range [0 - max].
Sort images onto separate workspaces
DigitalMicrograph - Gatan
This automation script iterates over all currently shown images and selects them one by one. The user is asked to press either ALT or CTRL to move the shown image to one of two newly created workspaces, or SHIFT to end the script.
Calling a Command-Line command from script and showing its output
DigitalMicrograph - Gatan
The script uses the Command-Line command "ipconfig" and outputs its results into a new text window of DigitalMicrograph. The script is a useful blueprint for similar tasks that can be performed from the regular Windows Command-Line.