Couple functions in ImageInfo() isn't working properly

put ImageInfo(“test”) into ii
put ii’s SearchType into st
put ii’s Tolerance into t
put ii’s Discrepancy into d
log st
log t
log d

Tolerance & Discrepancy return nothing. Is there another way to get that info?

Most of the properties only get written to the ImageInfo file if they are changed from the defaults (or if there is no default, such as with the CaptureLocation). Discrepancy is always 0 unless you deliberately change it. The default for the Precise search type is 1 and 45 for the Tolerant search type. These values can be changed globally in Preferences > Run Options > Screen and the new values will be applied to any image that has not had its default tolerance setting overridden. So if any of those properties don’t return a value, you know that they are using the defaults.

it still doesn’t work even when I change it. It still returns nothing.
It does return the right searchType, but not tolerance or discrepancy.

Well, the first issue is that Tolerance is actually returned as “ImageTolerance”, although when you are overriding the value using a property list, “Tolerance” will work. I can’t confirm this right now, but I think that the Discrepancy setting is getting stored as part of the image itself and isn’t written to the imageInfo file – there may not be a way to get to it programmatically. I’d steer clear of the Discrepancy setting most of the time – you can’t set it very high (i.e., > 5%) without getting false positives.

Thanks for the report. I can confirm that Discrepancy is not reported by ImageInfo() even when that attribute is set on the Image.

That has been fixed for the next build for all platforms (10.22 and beyond).