[1.1.0] PNG image generated in bundle with undotted find, exists, wait

Bug #1511117 reported by cafeman1 on 2015-10-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
High
RaiMan

Bug Description

Environment:
Windows 7
Java 1.7.0_51 64-bit
SikuliX 1.1.0 released on 2015-10-06
Installed with all options (1.1 2 3)

This is more of an annoyance than an issue, but when trying to open my program, I need to make use of find("image.png") without an explicit region. The documentation says that it is using the default screen object. It seems like any call to find("image.png"), or wait("image.png",FOREVER), or exists("image.png") on this default screen region creates a ".png" screenshot file as soon as a match is found. After I acquire a region using the Region(App("my-program").window()) , then I can call reg.find("image.png") and no more ".png" files are created. These files are of the form "1446059987072.png", and they start to pile up in the same folder where the script.py is located. Overall, the script itself has no issues performing the functions and runs to completion without errors. Is there a workaround or way to stop these .png files from being created?

Sample script:
 # Shortcut to open the program
 type("h", Key.CTRL + Key.ALT)

        # Wait until the menu bar appears
        # When menu bar is found, a png file is created
        # which is of a screenshot of the default screen
 while not exists("..\\imgs\\menu_bar.png"):
  sleep(1)

RaiMan (raimund-hocke) on 2015-10-29
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.1
summary: - PNG image generated for find, exists, wait
+ [1.1.0] PNG image generated in bundle with undotted find, exists, wait
cafeman1 (soto1231) wrote :

Hi RaiMan,

 Thank you for the quick response!

Sincerely,
-cafeman1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers