Question #286494 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/286494
Status: Open => Answered
Karl proposed the following answer:
You need to use single forward slashes or double backslashes on Windows
paths.
----
General hint for Windows users on backslashes \ and double apostrophes “
In a Sikuli script in normal strings enclosed in ” (double apostrophes), these
special characters \ and ” have to be escaped using a backslash, when you have
them inside the string. So for one backslash you need \\ and for one ” you need
\”. In a string enclosed in ‘ (single apostrophes), a ‘ has to be \’ and a ” is
taken as such.
To avoid any problems, it is recommended to use the raw string r'some text with
\ and " ...', since there is no need for escaping (but no trailing \ is allowed
here).
This is especially useful, when you have to specify Windows path’s containing
blanks or want to setup command lines for use with openApp(), App.open(),
run(), os.popen() or Jythons Subprocess module.
---
>From http://sikulix-2014.readthedocs.org/en/latest/interaction.html
Also, you can use runscript instead of execfile.
http://sikulix-2014.readthedocs.org/en/latest/scripting.html?highlight=runscript#runScript
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp