예제 #1
0
bot = cogbot(
    reelmemory(
        visualmap(
            'itau00.png',
            descript('agencia', what((88, 110), (263, 363)), what((88, 110), (318, 363)))
        ),
        visualmap(
            'itau01.png',
            descript('name', what((148, 391), (15, 438)), what((279, 328), (190, 265)))
        ),
        visualmap(
            'itau02.png',
            descript('keyboard', what((499, 806), (385, 741))),
            descript(0, what((655, 675), (419, 430)), where('buttons')),
            descript(1, what((655, 675), (599, 610)), where('buttons')),
            descript(2, what((655, 675), (659, 670)), where('buttons')),
            descript(3, what((655, 675), (539, 550)), where('buttons')),
            descript(4, what((655, 675), (479, 490)), where('buttons')),
            descript(5, what((655, 675), (691, 702)), where('buttons')),
            descript(6, what((655, 675), (571, 582)), where('buttons')),
            descript(7, what((655, 675), (451, 462)), where('buttons')),
            descript(8, what((655, 675), (631, 642)), where('buttons')),
            descript(9, what((655, 675), (511, 522)), where('buttons')),
            descript('OK', what((723, 744), (585, 630))),
            buttons=(
                ((156, 216), (34, 81)),   # Button "0 ou 7"
                ((156, 216), (94, 141)),  # Button "4 ou 9"
                ((156, 216), (154, 201)), # Button "3 ou 6"
                ((156, 216), (214, 261)), # Button "1 ou 8"
                ((156, 216), (274, 321))  # Button "2 ou 5"
            )
        )
    ),
    latch(watch(0, 'agencia', source='itau2_00.png'), mark('itau2_00.png', 'marked_itau2_00_agencia.png')),
    latch(watch(1, 'name', source='itau2_01.png'), mark('itau2_01.png', 'marked_itau2_01_name.png')),
    zoomin(watch(2, 'keyboard', source='itau2_02.png'),
        latch(watch(2, 2), mark('itau2_02.png', 'marked_itau2_02_key_0_2.png')),
        latch(watch(2, 0), mark('itau2_02.png', 'marked_itau2_02_key_1_0.png')),
        latch(watch(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_2_1.png')),
        latch(watch(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_3_1.png')),
        latch(watch(2, 0), mark('itau2_02.png', 'marked_itau2_02_key_4_0.png')),
        latch(watch(2, 9), mark('itau2_02.png', 'marked_itau2_02_key_5_9.png')),
        latch(watch(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_6_1.png')),
        latch(watch(2, 7), mark('itau2_02.png', 'marked_itau2_02_key_7_7.png')),
        latch(watch(2, 'OK'), mark('itau2_02.png', 'marked_itau2_02_key_ok.png'))
    )
)
예제 #2
0
bot = cogbot(
    reelmemory(
        visualmap(
            'itau00.png',
            descript('agencia', what((88, 110), (263, 423)), what((88, 110), (318, 363)))
        ),
        visualmap(
            'itau01.png',
            descript('name', what((148, 391), (15, 438)), what((279, 328), (190, 265)))
        ),
        visualmap(
            'itau02.png',
            descript('keyboard', what((650, 750), (410, 710))),
            descript(0, what((657, 667), (419, 430)), where('buttons')),
            descript(1, what((657, 667), (599, 610)), where('buttons')),
            descript(2, what((657, 667), (659, 670)), where('buttons')),
            descript(3, what((657, 667), (539, 550)), where('buttons')),
            descript(4, what((657, 667), (479, 490)), where('buttons')),
            descript(5, what((657, 667), (691, 702)), where('buttons')),
            descript(6, what((657, 667), (571, 582)), where('buttons')),
            descript(7, what((657, 667), (451, 462)), where('buttons')),
            descript(8, what((657, 667), (631, 642)), where('buttons')),
            descript(9, what((657, 667), (511, 522)), where('buttons')),
            descript('OK', what((723, 744), (585, 630))),
            buttons=(
                ((8, 64), (10, 56)),   # Button "0 ou 7"
                ((8, 64), (70, 116)),  # Button "4 ou 9"
                ((8, 64), (130, 176)), # Button "3 ou 6"
                ((8, 64), (190, 246)), # Button "1 ou 8"
                ((8, 64), (250, 296))  # Button "2 ou 5"
            )
        )
    ),
    latch(locate(0, 'agencia', source='itau2_00.png'), mark('itau2_00.png', 'marked_itau2_00_agencia.png')),
    latch(locate(1, 'name', source='itau2_01.png'), mark('itau2_01.png', 'marked_itau2_01_name.png')),
    zoomin(locate(2, 'keyboard', source='itau2_02.png'),
        latch(locate(2, 2), mark('itau2_02.png', 'marked_itau2_02_key_0_2.png')),
        latch(locate(2, 0), mark('itau2_02.png', 'marked_itau2_02_key_1_0.png')),
        latch(locate(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_2_1.png')),
        latch(locate(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_3_1.png')),
        latch(locate(2, 0), mark('itau2_02.png', 'marked_itau2_02_key_4_0.png')),
        latch(locate(2, 9), mark('itau2_02.png', 'marked_itau2_02_key_5_9.png')),
        latch(locate(2, 1), mark('itau2_02.png', 'marked_itau2_02_key_6_1.png')),
        latch(locate(2, 7), mark('itau2_02.png', 'marked_itau2_02_key_7_7.png')),
        latch(locate(2, 'OK'), mark('itau2_02.png', 'marked_itau2_02_key_ok.png'))
    )
)
예제 #3
0
bot = cogbot(
    reelmemory(
        visualmap(
            'itau00.png',
            descript('agencia', what((88, 110), (263, 533), precision=0.9), what((88, 110), (318, 363)))
        ),
        visualmap(
            'itau01.png',
            descript('name', what((148, 391), (15, 438), precision=0.98), what((200, 391), (15, 438)), what((279, 328), (190, 265)))
        ),
        visualmap(
            'itau02.png',
            descript('keyboard', what((499, 806), (385, 741), precision=0.94)),
            descript(0, what((655, 675), (419, 430)), where('buttons')),
            descript(1, what((655, 675), (599, 610)), where('buttons')),
            descript(2, what((655, 675), (659, 670)), where('buttons')),
            descript(3, what((655, 675), (539, 550)), where('buttons')),
            descript(4, what((655, 675), (479, 490)), where('buttons')),
            descript(5, what((655, 675), (691, 702)), where('buttons')),
            descript(6, what((655, 675), (571, 582)), where('buttons')),
            descript(7, what((655, 675), (451, 462)), where('buttons')),
            descript(8, what((655, 675), (631, 642)), where('buttons')),
            descript(9, what((655, 675), (511, 522)), where('buttons')),
            descript('OK', what((723, 744), (585, 630))),
            buttons=(
                ((156, 216), (34, 81)),   # Button "0 ou 7"
                ((156, 216), (94, 141)),  # Button "4 ou 9"
                ((156, 216), (154, 201)), # Button "3 ou 6"
                ((156, 216), (214, 261)), # Button "1 ou 8"
                ((156, 216), (274, 321))  # Button "2 ou 5"
            )
        )
    ),
    automate('run', r'"C:\Program Files\Internet Explorer\iexplore.exe" "http://www.itau.com.br"'),
    #automate('run', 'chromium-browser "http://www.itau.com.br"'),
    latch(locate(0, 'agencia', delay=3), click(Left)),
    automate('write', '0863963445\n'),
    latch(locate(1, 'name', delay=3), click(Left)),
    zoomin(locate(2, 'keyboard', delay=3),
        latch(locate(2, 2), click(Left)),
        latch(locate(2, 0), click(Left)),
        latch(locate(2, 1), click(Left)),
        latch(locate(2, 1), click(Left)),
        latch(locate(2, 0), click(Left)),
        latch(locate(2, 9), click(Left)),
        latch(locate(2, 1), click(Left)),
        latch(locate(2, 7), click(Left)),
        latch(locate(2, 'OK'), click(Left))
    )
)