Sikuli

在线文档:http://doc.sikuli.org
新版文档:https://sikulix-2014.readthedocs.io/en/latest/index.html
查询文档:http://nightly.sikuli.de/docs/index.html
FAQ:https://answers.launchpad.net/sikuli/+faqs
视频:http://www.sikuli.org/videos.html

global shortcut to force quit:

Windows: alt-shift-c
Mac: cmd-shift-c

OCR

Settings.OcrTextSearch = True;
Settings.OcrTextRead = True;


txt = Region(229,460,381,21).text()

popup(txt)

something like FindAll()

setShowActions(True)
sleep(1)

doubleClick(Location(469, 467))

sleep(2)
click(Location(1, 999))
type(Key.F12)
conti = True
while conti:
    try:
        if Region(0,997,64,51).find("1488719965688.png").getScore()>0.7:
                type(Key.F12)
                doubleClick(469, 467)
                conti = False
    except FindFailed:
        hover(Location(50,1030))
        sleep(2)
        hover(Location(100,1030))

next


for i in range(500):
    sleep(2)

    mulu_region=Region(1106,297,302,480)
    current = mulu_region.find("1494488488652.png")
    cur_loc=current.getCenter()
    print("next para")
    click(cur_loc.offset(20,30))
    if cur_loc.y>666:
        wheel(cur_loc.offset(20,-50),WHEEL_DOWN,3)
        sleep(1)
    hover(cur_loc.offset(300,0))
    sleep(30)
    type("d",KEY_SHIFT+KEY_ALT)
    result_region=Region(1281,34,399,163)
    result_region.setAutoWaitTimeout(FOREVER)
    done=result_region.find("1494485306350.png")
    switchApp("Mozilla Firefox")
    type("a",KEY_SHIFT+KEY_ALT)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容