1

In Sikuli I have an image where I need to check if the 1/4 of the lower half exists and if it does, use a specific function. Right now I have:

if(image.exists())
click()

The issue with this though is the .exists will either hang the script or function incorrectly. I'm looking for a better way to do this or a solution to this problem. Any help would be appreciated enter image description here enter image description here

Example is there's an additional segment, so you have Select All in one version (where it ends) and then Time/Date in a newer version. Want to be able to select the additional option of Time/Date but through images.

1 Answers1

1

This should be what you are looking for:

noteApp = App("notepad.exe")
click("editbutton-1.png")
region = Region(noteApp.focusedWindow())
print(region.text())

You can set the region.text() equal to the string you are looking for such as Date/Time and create a statement to run your function

Kristo Cule
  • 147
  • 15
  • Works in some cases but due to 1.1.4 having text recognition issues with small text, this can't be a definitive answer. Still need something that would be able to recognize small text/image patterns. – Mitchell Monarch May 16 '19 at 14:32