Set oScreenCapture = CreateObject("KnowledgeInbox.ScreenCapture")
'Get count of pixels which are different in both images
PixelCountDiff = oScreenCapture.CompareImages (File1,File2, "[PixelDiffCount]")
'Get percentage of pixels which are different in both images
PixelDiffPerc = oScreenCapture.CompareImages (File1, File2, "[PixelDiffPerc]")
MsgBox PixelCountDiff
MsgBox PixelDiffPerc
'Save the difference image
Call oScreenCapture.CompareImages (File1, File2, "C:\Difference.png")