-1

I have a sikuli code, which is running well on Sikuli IDE. Then I converted it into .skl file. When I run the .skl, it throws 30-40 lines of error and when I run the actual sikuli program on Sikuli IDE it is running well. I don't have Python IDLE in my system and errors that I got is

Since the first 22 lines are not visible, I pasting it below :-

Runtime Error when running C:\DOCUME~1\t6-test\LOCALS~1\Temp\tmp-664999291.sikuli\test.sikuli
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\_init_.py",line 3, in <module>
File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\sikuli.py", line 26, in <module>
java.lang.UnsatisfiedLinkError:C:\Program Files\Sikuli X\libs\Win32Util.dll:Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
at org.sikuli.script.Win32Util.<clinit>(Win32Util.java:19)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.sikuli.script.Env.getOSUtil(Env.java:91)
at org.sikuli.script.App.<clinit>(App.java:9)
at java.lang.class.forName0(Native Method)
at java.lang.class.forName(Unknown Source)
at org.python.core.Py.loadAndInitClass(Py.java:895)
at org.python.core.Py.findClassInternal(Py.java:830)
at org.python.core.Py.findClassEx(Py.java:881)

And the rest which is visible on the screen is following :-

error

And my code is :-

popup("Hello")
print("Hello")

I am using windows xp os and sikuli r930. Another things is that I ran the same .skl file in another file which has same os and sikuli version. But the code was working well in that system. Could anyone tell me where I am going wrong??

Praveen kumar
  • 597
  • 2
  • 14
  • 26

4 Answers4

1

I recommend running skl script according to Sikuli official manual: http://doc.sikuli.org/faq/010-command-line.html which means it should be done using command line.

To solve your problem, open console window and type something like this (change directory paths according to your setup):

"c:\Program Files\Sikuli X\Sikuli-IDE.bat" -r "c:\sikuli\someScript.skl"

I've never started skl scripts via double click. I always start them using batch files (actually batch scripts are invoked by other non-sikuli scripts).

Marcin Kowalczyk
  • 649
  • 6
  • 17
  • No I tried your option, but still it's not working throwing the same error. ".skl" was working for some basic programs like "hello world". The moment I double click ".skl" file, a popup message box used to appear. I came to know about .skl through this [**link**](https://answers.launchpad.net/sikuli/+question/99185) – Praveen kumar Jun 07 '13 at 09:16
  • So there must be something wrong with your script. I can't help you without seeing contents of .skl file. You can inspect it by yourself: just open it like zip file. Perhaps one last suggestion: please close all scripts except intended one in Sikuli IDE before saving it to .skl. – Marcin Kowalczyk Jun 07 '13 at 10:02
  • I edited and added my code. And I closed other scripts while running it. Still its not working. I tried the same ".skl" file in other system which has same os and sikuli version, but still its not working'. – Praveen kumar Jun 11 '13 at 05:33
0

--- as already suggested on your launchpad question:

The error image is not complete.

You say, you get the same error, when using the suggestion to run the .skl using Sikuli-IDE.bat.

You get some Java exception at startup. The error message and stacktrace is displayed in a popup, that does not show all lines and is not scrollable.

To get the complete information, you have tell the IDE, to print everything to the command line window.

This is how you tell it: - open a copy of Sikuli-IDE.bat in an editor - on the line, that calls java and has the -X, -D, -jar options add the following option (before the -jar option) -Dsikuli.console=false - take care, that this modified Sikuli-IDE.bat (use a different name ;-) is available in the Sikuli X program folder - use it to run your .skl the same way you did with the original SIKULI-IDE.bat

This should print the complete error/stack trace information in the command line window. Pls. make it somehow available in the net for inspection.

RaiMan
  • 1,088
  • 8
  • 13
  • I have update the first 22 lines. I tried your option, but rather than appearing on cmd, a message box poped up. This time I was able to move the message box. I couldn't copy it but I've typed it line by line. – Praveen kumar Jun 12 '13 at 10:09
0

Right click your .skl file. Go to properties. Change the Opens With default path to wherever your Sikuli-IDE.exe is located. In my case it is D:\Sikuli X\Sikuli-IDE.exe

Now double click the .skl file, it shall run.

Alternatively,

Go to Command line,

Type:-

C:\Windows\System32>"D:\Sikuli X\Sikuli-IDE.exe" -r D:\picapica.skl

Prateek Bhuwania
  • 755
  • 1
  • 8
  • 19
0

RightClickyour executable SKL file -> select Proprities ->open with Sikuli-IDE.bat (it will initiate IDE with proper jre configuration) its perfectly working in my end(you can see logs from java console)

Shantonu
  • 1,280
  • 13
  • 12