// Script function: Assign names to the two earliest opened images and bring them to front
// 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 GlobalSinoImage = CountImageDocuments()
 
imageDocument ForEMImageA = GetImageDocument( GlobalSinoImage-1 )
image EMImageA := ImageDocumentGetImage( ForEMImageA, 0 )
Showimage (EMImageA)
 
imageDocument ForEMImageB = GetImageDocument( GlobalSinoImage-2 )
image EMImageB := ImageDocumentGetImage( ForEMImageB, 0 )
Showimage (EMImageB)