Unable to paste \ sign

Asked by Akos Kovacs on 2019-01-22

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2019-01-23
Last query:
2019-01-23
Last reply:
2019-01-22
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.

Akos Kovacs (plaidshirtakos) said : #2

Thanks Manfred Hampl, that solved my question.