Sikuli X - Windows - libraries not found - problems when running a script

Asked by RaiMan

This question/answer is for documentation purposes.

--- Sikuli X-1.0 (installer and portable distribution)
--- Windows all Systems

You try to run a script and you get an error like this
java.language.UnsatisfiedLinkError: ..... Win32Util.dll .....

or any other errors, that talk about not found libraries
and you can find "... com.wapmx.nativeutils.jniloader.NativeLoader ...."
somewhere in the error traceback.

**** Installation directories and settings

--- On Windows, there are environment variables, that contain the standard directory for application programs and other software like Java. These environment variables can be inspected and edited in
System Properties -> extended System Properties -> Environment variables

- Windows 32-Bit
%PROGRAMFILES% (C:\Program Files\ in a standard installation)
Sikuli installs itself here (if not changed by you), when using the installer (%PROGRAMFILES%\Sikuli X\)

- Windows 64-Bit
%PROGRAMFILES% (C:\Program Files\ in a standard installation, contains 64-Bit applications and software)
%PROGRAMFILES(X86)% (C:\Program Files (x86)\ in a standard installation, contains 32-Bit applications and software)
Sikuli installs itself here (if not changed by you), when using the installer (%PROGRAMFILES(X86)%\Sikuli X\)

--- Correct Java version
Currently (X-1.0rc3) Sikuli runs with the 32-Bit JRE6. This normally is installed in
Win 32-Bit: %PROGRAMFILES%\Java
Win 64-Bit: %PROGRAMFILES(X86)%\Java
If it is somewhere else, you have to set the PATH accordingly or use %JAVA_HOME%, to point to the 32-Bit JRE.

--- PATH settings for Sikuli, to find it's libraries and some Java stuff

The following is for non standard situations and when using the zipped version of the Sikuli distribution (no installer provided).
When installing Sikuli somewhere else, you have to replace %PROGRAMFILES%\Sikuli X\ and %PROGRAMFILES(X86)%\Sikuli X respectively in the following with the absolute path to your installation directory.
When using the Sikuli installer, you only have to check the situation, if you run into problems.

The dynamic link libraries, that Sikuli needs for different system specific features, are located in Sikuli's installation directory in the directory named libs. So you need to have this added to the PATH:
Win 32-Bit: %PROGRAMFILES%\Sikuli X\libs
Win 64-Bit: %PROGRAMFILES(X86)%\Sikuli X\libs

additionally, Sikuli needs a library from Java. So this has to be added to PATH too:
Win 32-Bit: %PROGRAMFILES%\Java\jre6\bin
Win 64-Bit: %PROGRAMFILES(X86)%\Java\jre6\bin

So in the end the PATH should have these two additional entries:
Win 32-Bit: %PROGRAMFILES%\Sikuli X\libs;%PROGRAMFILES%\Java\jre6\bin
Win 64-Bit: %PROGRAMFILES(X86)%\Sikuli X\libs;%PROGRAMFILES(X86)%\Java\jre6\bin

If you used the Sikuli installer, have a standard Windows configuration and did not change the installation directory, the installer should have made these two entries:
Win 32-Bit: C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\bin
Win 64-Bit: C:\Program Files (x86)\Sikuli X\libs; C:\Program Files (x86)\Java\jre6\bin

Java7: When running with Java7, replace jre6 with jre7 (not done by the installer).

If your environment variables contain non standard directories, these should be shown in the generated PATH entries.

IMPORTANT:
--- It is recommended, to use System Properties -> extended System Properties -> Environment variables, to inspect and edit these variables.
--- Take care, that only these two mentioned PATH entries are present and that they point to the correct directories.
--- always use the Windows Software uninstall feature, before reinstalling Sikuli.
--- In some cases a reboot helps, after making changes to the environment
--- If Sikuli-IDE.exe does not work, try Sikuli-IDE.bat or Sikuli-IDE-w.bat from the Sikuli installation directory.

**** For Sikuli 10.x users, who migrate to Sikuli X:
When installing Sikuli X, you have to:
-- Uninstall Sikuli 10.x using the Windows Software uninstall feature
-- Reboot your machine
-- Install Sikuli X using the installer

Question information

Revision history for this message
RaiMan (raimund-hocke) said :
#1

I suppose, you have installed/unzipped your Sikuli X distribution in the directory "absolute-path-to-SikuliX", which in case you have used the installer in it's standard settings is c:\Program Files\Sikuli X

When using the Sikuli-IDE.bat (or sikuli-script.jar standalone), you have to make sure, that the following entries are in your system path
"absolute-path-to-SikuliX"\libs (which is already implemented if you have used the installer before)
"absolute-path-to-Java"\jre6\bin

So if Sikuli and Java are installed with there standard settings, your system path should contain:
c:\Program Files\Sikuli X\libs;c:\Program Files\Java\jre6\bin

If you have any individual situation, just adopt the entries accordingly.

Other prerequisites:
- uninstall Sikuli 10.2 using the uninstall feature of Windows before using the Sikuli X installer
- make sure you have the current Java runtime environment JRE from Sun/Oracle in it's 32-Bit version installed with the standard settings

Revision history for this message
Anshu (anshu-ca) said :
#2

Further Comment :
Not sure it was just my computer or others also faced this issue.

When i Uninstalled Sikuli 0.10.2 and installed Sikuli X ( on XP - 32 bit) , after restarting the computer i got the message that some variables in registry have been restored.
I ran script in Sikuli X and nothing would run with all those java errors.
I checked environment variables and found out that everything had been deleted - all path variables (even default windows ones).
Luckily that was a Virtual machine.So i went back to Sikuli 0.10.2.This time uninstalled previous version and Rebooted the computer , before installing Sikuli X and then it worked fine.

Anshu

Revision history for this message
Anirban (ani-chat82) said :
#3

I am getting the following exception while running a sikuli script in java in my 64 bit Windows 7 machine.
Can anyone of you help me out?

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\anirbanc\workspace\Sikuli\tmplib\Win32Util.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
 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:14)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at org.sikuli.script.Env.getOSUtil(Env.java:82)
 at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:174)
 at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:287)
 at org.sikuli.script.Screen.initBounds(Screen.java:96)
 at org.sikuli.script.Screen.<init>(Screen.java:108)
 at SikuliTest.main(SikuliTest.java:7)

Revision history for this message
RaiMan (raimund-hocke) said :
#4

Sikuli X-1.0rc1 (distribution) does not work on real Win 64-Bit (bug 702797).

You may try to set up a 64-Bit version from source (at least on Mac I got it running)
(see FAQ 1453)

Revision history for this message
Anirban (ani-chat82) said :
#5

In 32 bit WIn XP I got the following exception even after setting all the environment variables correctly. Can you please tell if I am missing something.

I set the following environment variables:
C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\bin

Windows utilities loaded.
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Documents and Settings\Anirban\workspace\SikuliTest\tmplib\VisionProxy.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.Finder.<clinit>(Finder.java:20)
 at org.sikuli.script.Region.findNow(Region.java:589)
 at org.sikuli.script.Region.wait(Region.java:277)
 at org.sikuli.script.Region.find(Region.java:235)
 at org.sikuli.script.Region.getLocationFromPSRML(Region.java:652)
 at org.sikuli.script.Region.click(Region.java:346)
 at SimpleTest.main(SimpleTest.java:10)

Revision history for this message
RaiMan (raimund-hocke) said :
#6

Did you have 0.10.2 installed?

If yes, you need to purge everything that belongs to this distribution.

Check the whole path.

Put "C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\bin" at the beginning of PATH.

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
Anirban (ani-chat82) said :
#8

Any update on Sikuli working on Win 7 64 bit platform? In my Win 7 64 bit machine, Sikuli IDE is working fine but still got no luck with the Java library of Sikuli. It is throwing the same below exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\anirbanc\workspace\Sikuli\tmplib\Win32Util.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
 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:14)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at org.sikuli.script.Env.getOSUtil(Env.java:82)
 at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:174)
 at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:287)
 at org.sikuli.script.Screen.initBounds(Screen.java:96)
 at org.sikuli.script.Screen.<init>(Screen.java:108)
 at SikuliTest.main(SikuliTest.java:14)

Revision history for this message
ShmenonPie (shmenonpie) said :
#9

I fixed this the following way (for 32 bit systems with JRE7, if you're on 64, I suspect it'll still work but you'll need to change %PROGRAMFILES% to %PROGRAMFILES(X86)%):

Open up Control Panel, search for Environment Variables, get that dialog up, then edit Path to include "%PROGRAMFILES%\Java\jre7\bin" and "%PROGRAMFILES%\Sikuli X\libs", then edit PathExt to include ".DLL".

The reason the suggested solutions above don't work is because DLL files aren't searched for in the path locations by default, so that should fix it.

Revision history for this message
RaiMan (raimund-hocke) said :
#10

@ShemenonPie:

PATHEXT environment variable need NOT be edited for DLLs to be found.

The directories in the PATH environment variable are always searched for DLL's, that cannot be found in the system directories, the current directory, the load directory or some app specific directories.
(see: http://msdn.microsoft.com/en-us/library/ms682586(v=vs.85).aspx)

PATHEXT is only for finding files, that are used on the command line as executables.

Revision history for this message
ShmenonPie (shmenonpie) said :
#11

Well, I would disagree based on the anecdotal evidence that that was the only change I made between restarts of my computer and it wasn't working before and was afterwards.

Revision history for this message
RaiMan (raimund-hocke) said :
#12

@ShemenonPie:

I just tested on my Win7 64Bit:

I have both Java (6-27) installed (32Bit and 64Bit) in the standard directories. Using the java command from command line starts the 64Bit VM.

-- used the Sikuli installer
It installed into C:\Program Files (x86)\Sikuli X
and added to user's PATH:
C:\Program Files (x86)\Sikuli X\libs; C:\Program Files (x86)\Java\jre6\bin
as expected.
Without rebooting and just using the Sikuli-IDE-w.bat (as recommended for Win 64Bit), I had no problems starting the IDE and using it's features.

Without having tested this on my Win7 32Bit, I dare to state, that this will be the same there (according to the recipe given above).

Revision history for this message
paramveer (paramveer-mca) said :
#13

Hi Team,

I have used Sikuli Zip version with following steps.

1. Unzip the Sikuli, named the folder as "Sikuli x" and put it into program files.
2. installed jre6 on the machine.
3. Set the environment path with "Path" as variable and C:\Program Files\Sikuli X\libs; C:\Program Files\Java\jre6\bin as variable Value.
4. I tried to execute my scripts.

On some machine it is perfectly running but on some machines it is giving error as follows.

Exception in thread "main" java.lang.unsatisfiedlinkerror %temp%\templib\win32utli.dll. This application has failed to start because the application configuration is incorrect. Reinstalling this application may fix this problem.

Please help me to come out of this issue.

Thanks in advance.

Revision history for this message
paramveer (paramveer-mca) said :
#14

Following is the exact error. C:\xyz.jar contains some methods to send command line statement to sikuli which is working fine.

Z:\>java -jar "C:\xyz.jar" "click" "C:\testimg.PNG"
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Siku
li 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.ScreenHighlighter.init(ScreenHighlighter.java:180)
        at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:293
)
        at org.sikuli.script.Screen.initBounds(Screen.java:105)
        at org.sikuli.script.Screen.<init>(Screen.java:117)
        at skip.cvb.main(cvb.java:22)

Also i have set the SIKULI_HOME path in environment variable. still getting this error.

Thanks in advance.

Revision history for this message
RaiMan (raimund-hocke) said :
#15

So check what is the difference between these machines.

Revision history for this message
wong ho (who-7) said :
#16

I had the same error and I managed to solve it!

Context first :
- environment : Windows 7 - 64 bit / JRE 6 x86(32bit) / JRE 6 x64(64bit)
- error happened when integrating Sikuli in another project ( selenium) in Eclipse

I was able to run the Sikuli IDE 32 bit and 64 bit without any issues, but when trying to run and use recognition in Eclipse i got this same error.

=> Solution (IDE - proved working) : instead of running the x64 JRE, load and run the x86 version of the JRE !! and tada it works !

=> if encountering the same issue on running Sikuli IDE > check installation of x86 JRE and in configuration panel, look for the Java icon to enter Java settings > load the x86 JRE only !

I hope that this will help !

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#17

please help me,
I will use
JRE6, Windows 7 32 bit OS
Installed correctly but not working

[error] Stopped
[error] An error occurs at line 1
[error] Error message: Traceback (most recent call last):
 File "", line 1, in
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py", line 3, in
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py", line 26, in
java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.script.App
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)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)
at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:122)
at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)

at org.python.core.PyObject.__findattr__(PyObject.java:863)
at org.python.core.imp.import_name(imp.java:849)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importFromAs(imp.java:978)
at org.python.core.imp.importFrom(imp.java:954)
at sikuli.Sikuli$py.f$0(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py:211)
at sikuli.Sikuli$py.call_function(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.

zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.PyModule.impAttr(PyModule.java:100)
at org.python.core.imp.import_next(imp.java:715)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at sikuli$py.f$0(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py:3)
at sikuli$py.call_function(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:

18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.imp.import_next(imp.java:713)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at org.python.pycode._pyx5.f$0(:1)
at org.python.pycode._pyx5.call_function()

at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.Py.exec(Py.java:1305)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
at org.sikuli.script.ScriptRunner.runPython(ScriptRunner.java:61)
at org.sikuli.ide.SikuliIDE$ButtonRun.runPython(SikuliIDE.java:1572)
at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(SikuliIDE.java:1677)

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.script.App

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#18

Thanks I'm waiting for help

Revision history for this message
RaiMan (raimund-hocke) said :
#19

@Chandana
What exactly are you doing, when this error happens?

paste the script snippet.

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#20

I'm going to click on start button on win 7, then type paint on search box

click("start.png")
type(paint)

Please help me, I don't work anything in this software

Revision history for this message
RaiMan (raimund-hocke) said :
#21

@ Chandana

Does the capture button of the IDE work? (inserts the image thumbnail into the script)

might be a typo, but it must be:

type("paint")

and since I guess you are clicking the Windows start button, a wait after the click is helpful, to give the GUI some time:

click("start.png")
wait(1)
type("paint")

Revision history for this message
RaiMan (raimund-hocke) said :
#22

in a command line window say:
set <press enter>

and paste the output here.

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#23

I have try using following code but not work it for me.

click("start-1.png(screenshot here)")
wait(1)
type("paint")

Please help me, Don't work everything on this software for me.

Revision history for this message
RaiMan (raimund-hocke) said :
#24

@ Chandana

That is no surprise, since it has nothing to do with your problem - only a general recommendation.

So what about comment #22:
in a command line window say:
set <press enter>

and paste the output here.

BTW: Please help me, Don't work everything on this software for me.

not needed here. If help is possible, you will get it.

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#25

I got following error,

[info] Sikuli vision engine loaded.

[error] Stopped
[error] An error occurs at line 1
[error] Error message: Traceback (most recent call last):
 File "", line 1, in
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py", line 3, in
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py", line 26, in
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.(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.siku

li.script.App.(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)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)
at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:122)
at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)
at org.python.core.PyObject.__findattr__(PyObject.java:863)
at org.python.core.imp.import_name(imp.java:849)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.import

FromAs(imp.java:978)
at org.python.core.imp.importFrom(imp.java:954)
at sikuli.Sikuli$py.f$0(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py:211)
at sikuli.Sikuli$py.call_function(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.PyModule.impAttr(PyModule.java:100)
at org.python.core.imp.import_next(imp.java:715)
at org.py

thon.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at sikuli$py.f$0(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py:3)
at sikuli$py.call_function(C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuilt

inMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.imp.import_next(imp.java:713)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at org.python.pycode._pyx2.f$0(:1)
at org.python.pycode._pyx2.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.Py.exec(Py.java:1305)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
at org.sikuli.script.ScriptRunner.runPython(ScriptRunner.java:61)
at org.sikuli.ide.SikuliIDE$ButtonRun.runPyth

on(SikuliIDE.java:1572)
at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(SikuliIDE.java:1677)

java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: C:\Program Files\Sikuli X\libs\Win32Util.dll: Can't find dependent libraries

Revision history for this message
RaiMan (raimund-hocke) said :
#26

@ Chandana
OK.

But what about comment #22 ????

I try again ;-)

--- open a command line window
--- type the command set and press enter (prints your environment settings)
--- copy the output you get and paste it here.

Should be manageable ;-)

Revision history for this message
Chandana Liyanagamage (fvchandana) said :
#27

Thanks,
I got answer for this error, I test in win 7 previously, Then I test it in Win XP it is perfectly work for me.
Thanks for your help.
But I need more bit help, How to loop same task using this tool.
Can you tell me how to loop same task 10 times ?

Revision history for this message
RaiMan (raimund-hocke) said :
#28

@ Chandana
see faq 1437.
More scripting possibilities can be taken from Python examples and the Python docs (see the Sikuli docs).

the faqs have some basic topics about questions you might have about special Sikuli aspects in the future.

One more thing: If you have more questions in the future, make up your own new question - so more people will see it and have a chance to answer (you current approach works, since I am one of the few, that sees all activities here and reacts)

Revision history for this message
Michiel Vanthuyne (djfreemc) said :
#29

Is this possibly related to an error in the windows installer? I noticed that on the windows vista 32 bit systems where I installed sikuli, the path that is set by the installer has a double slash before "bin"

C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\\bin
instead of the path in this article that says it should be:
C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\bin

Revision history for this message
RaiMan (raimund-hocke) said :
#30

@ Michiel
Good catch. Yes this is a fact.
But it seems to not do any harm.

Revision history for this message
Michiel Vanthuyne (djfreemc) said :
#31

Hi RaiMan,
Thanks for your feedback.

I'm not completely convinced this does not do any harm. In the situation I tried, I could prevent the error above from happening by correcting the double slash.

I had a batch file with something like:

@echo off
"c:\program files\sikuli x\sikuli-ide.bat" -r "c:\users\administrator\sikuli scripts\myscript.sikuli"

When running the batch file by double-clicking it, everything was fine.
When the batch file was started from the task scheduler, I received the error described above.

Revision history for this message
RaiMan (raimund-hocke) said :
#32

@ Michiel

If your script runs in one case and not the other, then this surely has nothing to do with the double backslash ;-)

What exactly is your error, when running the script via task scheduler?

There are some tricky situations with Sikuli scripts and Windows task scheduler (search in the Questions)

Revision history for this message
William Threats (threats5) said :
#33

Thanks for this program, I have been looking for something like this.

However, I am running into the problem where when I try to take a screenshot or set a region, the program goes away and I am unable to get it back. Also, The command keys for taking a screenshot or trying to set a region do no work. I am on a windows 7 64x machine

Revision history for this message
RaiMan (raimund-hocke) said :
#34

@ William
faq 2005