could not find the location where Screen.capture(region) stores the image

Asked by Subramanian

Im trying to find the location where the temporary image captured by Screen.capture(image) is stored in my machine. Please find the code im using.

from org.sikuli.script import Region, Screen
import shutil
from org.sikuli.script import ScreenImage

reg = Region(0,0,1600,900)
objvalue = Screen(0)
pathvalue = objvalue.capture(reg)
#shutil.move(pathvalue,"C:\Users\KESUBRAMANIAN\Desktop\test.png")
print(pathvalue)

On running the above code, the value printed is 'org.sikuli.script.ScreenImage@969fb8'. I could not find this in Temp folder.
Also, i could not move the image using shutil.move function and it throws an error stating

TypeError: coercing to Unicode: need string, org.sikuli.script.ScreenImage type found

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Subramanian (subbu2687) said :
#1

Request you to please help on this ASAP.
Thanks!

Revision history for this message
masuo (masuo-ohara) said :
#2

pathvalue = objvalue.capture(reg).getFile()

https://bugs.launchpad.net/sikuli/+bug/1589474

Can you help with this problem?

Provide an answer of your own, or ask Subramanian for more information if necessary.

To post a message you must log in.