Oculix Wiki
Visual Automation IDE — automate anything you see on screen
Brought to you by:
julienmer
Running scripts from the command line (
-rmode) without the IDE GUI now works reliably.
java -jar oculixide-3.0.1-complete-win.jar -r script.py
# → UnsatisfiedLinkError: 'long org.opencv.core.Mat.n_Mat()'
In SikuliX and early OculiX, the -r mode crashed because:
SikulixIDE.showAfterStart() was called even without a GUIresetBeforeScriptStart() threw errors in non-IDE context| Problem | Fix |
|---|---|
Core.NATIVE_LIBRARY_NAME returned opencv_java454 but DLL is opencv_java4100 |
Updated Core.java to match Apertix 4.10.0 |
loadOpenCV() set libOpenCVloaded = true even on failure |
Only true on success, with 3-stage fallback |
Apertix nu.pattern.OpenCV.loadLocally() never called |
Now the primary loading method |
// Before: always called, crashed in -r mode
SikulixIDE.showAfterStart();
// After: only in IDE mode
if (!Commons.hasOption(RUN)) {
SikulixIDE.showAfterStart();
}
# Before: crashed if resetBeforeScriptStart() unavailable
resetBeforeScriptStart()
# After: safe fallback
try:
resetBeforeScriptStart()
except:
pass
main() → initOptions → SikulixIDE.start()
→ ... IDE initialization ...
→ Finder2 static {} → Commons.loadOpenCV() (lazy, on first find)
main() → initOptions → Commons.hasOption(RUN)
→ Commons.loadOpenCV() ← explicit, early
→ Runner.runScripts(scripts) ← execute and exit
→ RunTime.terminate(exitCode)
# Run a Jython script headless
java -jar oculixide-3.0.1-complete-win.jar -r path/to/script.py
# With arguments passed to the script
java -jar oculixide-3.0.1-complete-win.jar -r script.py -- arg1 arg2