Fix Failed Module Import in Sikuli Scripts

Sikuli IDE throws below error while importing the modules essentially with import subprocess Code: [code language=”csharp”] import sys import time import subprocess import os [/code] Error Message: [info] Sikuli vision engine loaded. [info] Windows utilities loaded. [info] VDictProxy loaded. [error] Stopped [error] An error occurs at line 3 [error] Error message: Traceback (most recent call last): File “C:\Users\GOVARD~1\AppData\Local\Temp\sikuli-tmp6393242728040316401.py”, line 3, in import subprocess  File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\subprocess.py”, line 642, in File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\subprocess.py”, line 640, in _setup_platform File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\warnings.py”, line 56, in warn File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\warnings.py”, line 56, in warn IndexError: index out of range: 0 […]

Read more

Accessing 64bit registry keys via 32bit scripting languages

Accessing 64bit registry keys via 32bit scripting languages: This is a very often requirement since the evolution of 64bit platforms.  By default, an application or script receives data from the corresponding provider when two versions of providers exist. The 32-bit provider returns data to a 32-bit application, including all scripts, and the 64-bit provider returns data to the 64-bit compiled applications. However, an application or script can request data from the nondefault provider, if it exists, by notifying WMI through flags on method calls. Context Flags The __ProviderArchitecture and __RequiredArchitecture string flags have a set of values handled by WMI […]

Read more

Perl Script: Basic Template

[code language=”perl”] #! perl #=============================================================================== # Objective: # ———- # # This is a sample Perl script template. # #=============================================================================== # Include Modules #=============================================================================== use strict; use warnings; use Pod::Usage; use Getopt::Long qw(:config no_ignore_case bundling); #=============================================================================== # Global Variables Declaration #=============================================================================== use vars qw($DEBUG); #=============================================================================== # Prototypes Section #=============================================================================== sub DoAction; sub InitGlobals; sub ProcessArgs; #=============================================================================== # main() #=============================================================================== { InitGlobals(); ProcessArgs(); DoAction(); } #=============================================================================== # sub InitGlobals #=============================================================================== sub InitGlobals { } #=============================================================================== # sub ProcessArgs #=============================================================================== sub ProcessArgs { Getopt::Long::Configure("bundling", "no_ignore_case"); if (!GetOptions(‘D’ => \$DEBUG, ‘h|?’ => sub { &pod2usage(-verbose => 2)}) || @ARGV ) { pod2usage(2); } […]

Read more