// Script function: Find two most front images and set their names // 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 img1, img2 if ( !GetFrontImage( img1 ) ) Throw( "No image displayed." ) SetName(img1, "The most front image") img2 := FindNextImage( img1 ) // Check if a valid image was found if ( !ImageIsValid( img2 ) ) Throw( "No image 'behind' the front image." ) SetName(img2, "The second most front image")