Name capture

Asked by Vinicius Bittencourt on 2019-12-27

I am using sikuli in eclipse. When printing and saving, sikuli is inserting its own text in the file name. Would you like to know how to remove this?

This is my code:

Calendar c = Calendar.getInstance ();
String dir = "C: \\ Sikuli \\ evidence \\" + class + c.get (Calendar.DAY_OF_MONTH) + c.get (Calendar.MONTH - 1)
+ c.get (Calendar.YEAR) + c.get (Calendar.HOUR_OF_DAY);
File directory = new File (dir);

s.capture (s) .save (dir, "sikuli" + c.get (Calendar.HOUR_OF_DAY) + c.get (Calendar.MINUTE) + c.get (Calendar.SECOND) + ".png");

the file goes with this name:

sikuli151134.png-1577466694247.png

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-12-27
Last reply:
2019-12-28
RaiMan (raimund-hocke) said : #1

use
s.capture (s) .getFile (dir, "sikuli" + c.get (Calendar.HOUR_OF_DAY) + c.get (Calendar.MINUTE) + c.get (Calendar.SECOND))

Can you help with this problem?

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

To post a message you must log in.