

// Script function: Display/list all the names of the opened images in the Output window on DM 
// and show the total number of opened images
// Requirement: Open multiple images


// 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 EMImageCount = CountImages()
Number MyTotalImages
MyTotalImages = EMImageCount - 1
if (EMImageCount > 0)
{
    for (Number GlobalSinoImageSeries = 1; GlobalSinoImageSeries < EMImageCount; GlobalSinoImageSeries++)
    {
        Image MyNextImage := FindImageByIndex(GlobalSinoImageSeries);
        String EMImageName = MyNextImage.ImageGetName();
        Result("Image " + GlobalSinoImageSeries + ": " + EMImageName + "\n");
    }
}
else
    Result("None\n");

Result( "My Total Opened Images are " + MyTotalImages +"\n");