jianbing / sikulitool Goto Github PK
View Code? Open in Web Editor NEW对sikulixapi.jar进行了封装,可以在Python中直接调用
License: MIT License
对sikulixapi.jar进行了封装,可以在Python中直接调用
License: MIT License
我这边想通过 pip install 进行安装,但是没有找到相应的包。
我看您说到sikuli_cpython这个项目,我安装后,每次运行到:
target = ImageTarget(target_file_loc)
就会报错:
File "E:\workplace\scrapy_env\lib\site-packages\sikuli\sikuli.py", line 155, in _get_target_from_string
target = ImageTarget(target_file_loc)
File "jnius\jnius_export_class.pxi", line 157, in jnius.JavaClass.init
File "jnius\jnius_export_class.pxi", line 236, in jnius.JavaClass.call_constructor
File "jnius\jnius_utils.pxi", line 93, in jnius.check_exception
jnius.JavaException: JVM exception occurred: Image file can not be loaded from \xe4
一直不能打开图片。jdk 是1.80, python为3.5,我看官方是2.7,但是我存了侥幸心理,但不知道是不是python版本的原因。
我之所以向您提出这个问题,确实是我在网上找不到类似的了。我想既然您对sikuli_cpython比我更理解,所以我冒昧提出这个问题。非常感谢。
jnius这个不知道如何安装
前面幾段拖曳進文件夾的指令能正常執行,但找尋相似圖標那一行會報錯
測程式碼如下:
`from sikulitool.sikuli import *
def demoFunc():
s = Screen()
s.dragDrop("icon_QQ.png", "icon_config.png")
#s.sleep(0.5)
#s.dragDrop("qq.png", "dir.png")
s.find("icon_config.png").highlight().sleep(1).doubleClick()
for i in s.findAll(Pattern('icon_config.png').similar(0.5)):# >> this line will get Type Error
i.highlight().sleep(1).hover()`
錯誤訊息如下:
`
[log] highlight M[151,721 68x92]@s(S(0)[0,0 1920x1080]) S:0.97 C:185,767 [483 msec] for 1.0 secs
[log] DOUBLE CLICK on L(185,767)@s(0)[0,0 1920x1080]
Traceback (most recent call last):
File "D:/Works/PyWorkSpace/PythonTest/sikuliTest.py", line 2, in
demoMod.demoFunc()
File "D:\Works\PyWorkSpace\PythonTest\demo\demoMod.py", line 10, in demoFunc
for i in s.findAll(Pattern('icon_config.png').similar(0.5)):
File "D:\Works\PyWorkSpace\PythonTest\sikulitool\sikuli.py", line 160, in similar
return self._pattern.similar(sim)
TypeError: 'float' object is not callable
Process finished with exit code 1
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.