Unable to paste \ sign

Asked by Akos Kovacs

I need to paste a filepath into a field. It is pasted by paste() method without \ signs in the file chooser dialog window.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

If you manually enter the string like this
paste("C:\_private")
then the backslash character is (wrongly) interpreted as escape sequence starter.

Test your program with
paste("C:\\_private")
and it should correctly output a single backslash.

Revision history for this message
Akos Kovacs (plaidshirtakos) said :
#2

Thanks Manfred Hampl, that solved my question.