ok, thanks for feedback. yes this is a historical oddity with the scripting and Java API:
SCREEN.capture() uses a Python implementation, that is bound to the SCREEN object (a quasi constant for Screen(0)). Simply using capture() would yield the same, since all Region/Screen functions are bound to SCREEN when used undotted. When you use Screen(x).capture() you use the function at the Java API level in class Screen, which always returns a ScreenImage (with which you can use getFile()). This will to some extent be revised in 2.1.0, where the features for all Objects with pixel content (Screen, Region, Match, Image, ScreenImage, ...) will be consolidated. ... but there is always the need for being as backwards compatible as possible or needed. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1863949 Title: [2.0.2] VNC: capture() returns ScreenImage instead of filename Status in Sikuli: In Progress Bug description: In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it is no longer returning a file path. I cannot find anywhere where this behavior is documented and therefore am reporting it as a bug. It seems to be returning a java object and making a java call. imagePath = SCREEN.capture() print imagePath imagePath = VNC.capture() print imagePath imagePath = capture(VNC) #FYI - local screen captured print imagePath exit(0) Actual: CConnection: Server supports RFB protocol version 3.8 CConnection: Using RFB protocol version 3.8 org.sikuli.script.ScreenImage@59ab5f32 org.sikuli.script.ScreenImage@4236bae8 [info] Exit code: 0 /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png Expected: shutil.move(vnc.capture(), FULL_PATH) #from tmp Work around: img = vnc.capture().saveInBundle("temp") shutil.move(img, FULL_PATH) #from bundle To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1863949/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

