There is not a way to set the discrepancy at the beginning of a script. The only way to set the discrepancy is to go to the info drawer on the images tab of the suite.
However, adjusting the discrepancy is not a recommended way to make new images match. We usually recommend creating an image collection that holds multiple images. EggPlant will look for as many of the images in the collection as required in order to find an image on the screen, and will not throw an “image not found” error until it has searched for all of the images in the collection.
If your application is changing so frequently that creating image collections will be difficult, please post your images or write in to our support team with different versions of the same image.