
// Script function: Select the second-last image
// Requirement: Open at least two images

// This script is an Object-oriented programming (OOP) coding style

// 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


number GlobalSinoImage = CountImageDocuments()

// Select an image from the opened images by counting from front to back. 
// e.g. To select the second-last image below ("-2" below)


GetImageDocument(2).ImageDocumentGetImage(0).SelectImage()


// Or, see this script function in conventional DM style at
 // www.globalsino.com/EM/page2597_CountImageDocuments.s