This may or may not be exactly what you are looking to do, but it gives the basic concept of how you can capture an image of a certain area of the screen and use it later.
The example code below would be used in a scenario where you would capture the image, do something that may change how that looks, and then search for the image you captured to see if that area of the screen changed or not.
--SearchType is optional. Rectangle can be defined with images or coordinates.
captureScreen (Name: "ImageToCompare",rectangle:("Image1","Image2"))
put the result into ImageToCompareVar
//Do something that may change the image on screen
if imageFound(ImageToCompareVar, searchType:Tolerant) then
log "Image Matched"
log "Image Didn't Match"