error when trying to run sikuli script from a batch file

Asked by arminius on 2017-08-07

"C:\Users\Me\Sikuli\Executables>C:\Users\Me\Sikuli\runs
ikulix.cmd -r C:\Users\Me\Sikuli\red button.sikuli
+++ running this Java
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) Client VM (build 25.144-b01, mixed mode)
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar
C:\Users\me\Sikuli\sikulix.jar -r C:\Users\Me\Sikuli\red button.sikuli
Aug 07, 2017 4:39:02 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[error] FileManager: Not a valid Sikuli script project:
C:\Users\me\Sikuli\Open.sikuli
[error] FileManager: Not a valid Sikuli script project:
C:\Users\Me\Sikuli\Executables\Open.sikuli
[error] FileManager: Not a valid Sikuli script project:
C:\Users\Me\Sikuli\Executables\button.sikuli
[error] FileManager: Not a valid Sikuli script project:
C:\Users\Me\Sikuli\Executables\-.sikuli
[error] FileManager: Not a valid Sikuli script project:
C:\Users\Me\Sikuli\Executables\red.sikuli

C:\Users\Me\Sikuli\Executables>"

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2017-08-07
Last query:
2017-08-07
Last reply:
2017-08-07
Best Manfred Hampl (m-hampl) said : #1

There is a space character in the file name, so you have to put quotes around it
C:\Users\Me\Sikuli\runsikulix.cmd -r "C:\Users\Me\Sikuli\red button.sikuli"
or even better: rename the file not to have embedded special characters.

arminius (arminius75) said : #2

Thanks Manfred Hampl, that solved my question.