
// Script function: Find an image by an exact name (case-sensitive).


// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html

image img
string name = "Test" // The name has to exact the same as set here (case-sensitive).       
img := FindImageByName( name ) 

if ( !ImageIsValid( img ) )
 Throw( "No image named '" + name + "' found." )

SetName(img, "The image that I want")