OCR Wait times?

It seems OCR likes to wait about 3 minutes before failing. Anyway to speed that up?

I have a parameters script with.
set the imageSearchTime to 55 seconds

but it doesn't seem to care eg.
scriptparameters
connect iphone
Show "remotewindow"

If ImageFound (10.0, "bell")
	click foundImagelocation()
Else
	Click (text:"bell")
End if

By the way this is my fix for some pesky images... those that have detectable text. First I make a crap ton of images of every type and put them in a collection. Since that's the fastest... then as a last resort... OCR.

Seems to have improved some brittleness issues.

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    The ImageSearchTime is the minimum amount of time that eggPlant will spend looking for something before an image search fails. By default, it will search a minimum of 1.8 seconds, but that includes 7 full searches of the screen with .3 second delay between each one. An OCR search of a full screen takes a lot longer (even when testing a phone) than an image search does, and it will complete all 7 searches before giving up, regardless of what the Search Time setting is. Setting the Search Time to 55 seconds compounds the problem because it changes the Image Search Count to 56 and the Image Search Delay to 1 second, so now you're having to wait for eggPlant to search the screen 56 times:
    set the imageSearchTime to 55
    put the imageSearchCount // outputs 56
    put the imageSearchDelay // outputs 1
    
    You can't set a maximum search time. You can change the Image Search Count and the Image Search Delay instead of changing the Image Search Time:
    set the ImageSearchCount to 3
    set the imageSearchDelay to .3 // you need to specify the delay or it will default to 1
    put the imageSearchTime // outputs 0.6
    
    That should shorten the time for your OCR searches to fail when the image is not present.
  • Interesting... I did not know that for sure. I've had that imageSearchTime parameter in there since v4.0 or maybe earlier... now that we're on the subject... do you see anything here you would change?
    // set the remoteWorkInterval to 1.1 
    // set the mouseMoveSpeed to 8 
    set the nextKeyDelay to 0.15  -- was 0.15 Trying to Speed things up
    set the keyDownDelay to 0.1 -- was 0.2 Trying to speed things up
    set the shouldRepositionMouse to False -- For Windows 7 Grrrrrr!
    // set the imageSearchTime to 55 seconds
    
  • EggplantMattEggplantMatt ForumAdmin admin
    Not sure if I'm supposed to be commenting on the lines that are commented out. Your changes to the typing settings say that you are trying to speed things up, but they are much, much slower than the defaults which are 0.001 for the Key-Down Delay and 0.010 for the Next-Key Delay. If they were set to .15 and .2, those would have been manual overrides of the default values (click the "Restore Default Run Options" button to return the Preferences to their default values.)

    The change to ShouldRepositionMouse is fine, but there are two other options: 1) Disable the "Desktop Peek" on your Windows 7 SUTs or 2) change the position that the mouse is moved to by using the RepositionPoint global variable:
    setoption RepositionPoint, remoteScreenSize() - (1, 200)
    
Sign In or Register to comment.