Highlight commands as they run

Asked by arminius on 2017-07-16

I have a question about the Sikuli IDE itself, I have a script that has multiple lines with similar screenshots, I won't go into why I feel I need to do that, but I'm using "while not exists(Pattern("screenshot.png").targetOffset(206,-22)):

But alot of the time it just waits forever, I need to lower the match slighty, but when I "Ctrl Alt C" the program does not show where it was upto.

Is there anyway of displaying where the script was upto when it was killed?
If I were to invest in two monitors would I see where Sikuli is upto on one screen as it's executing on the other screen?

Version 1.1.1
On Windows 7

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
arminius (arminius75) said : #2

I tried this code.
"Settings.UserLogs = True
Settings.UserLogTime = True
Debug.setUserLogFile("C:\Users\Me\Desktop\Sikuli bug file.txt")"

ran the script but nothing was written to the .txt file.

masuo (masuo-ohara) said : #3

You wrote nothing not yet.

to write a user log message:
Debug.user("text with %placeholders", args …)
where text is a string according to the rules of Java String.format().

arminius (arminius75) said : #4

I tried "Debug.user("text with %placeholders", args …)"
it threw error messages, like "[error] script [ test ] stopped with error at line --unknown--
[error] Error caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value"

I assumed it was an example and I was supposed to know what to put after args....

masuo (masuo-ohara) said : #6

Debug.user("start function abc")
Debug.user("step 1")

no = 2
msg = "step %d" % no

Can you help with this problem?

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

To post a message you must log in.