Can sikuli capture screenshots and save them as files?

Asked by 谢宝良 on 2017-12-19

Can sikuli capture screenshots and save them as files?

Can sikuli still select regional screenshots?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
谢宝良 (xiebaolianger) said : #2

Thank you for friends upstairs.
But it does not seem to be able to specify a save path

RaiMan (raimund-hocke) said : #3

please read again carefully:

capture(region | text, [path, ]name)
only available in Python scripting

| text (region) – an existing region object or text to display in the interactive mode.
path – a path to a folder where the image is stored
text – name of the image file (.png can be omitted)
the absolute path of the stored image as path/name.png or None if no success
Works principally the same as the normal capture, but directly stores the resulting image to the specified location. The ``name``spec need not have the .png ending.

If the path specification is omitted, the imagefile is stored in the current bundlepath. In this case the imagename will finally be bundlepath/_name.png, where the leading underscore is an IDE convention to block the deletion of images, that are not namely referenced somewhere in the script, at the time the script is saved in the IDE.

Can you help with this problem?

Provide an answer of your own, or ask 谢宝良 for more information if necessary.

To post a message you must log in.