用python实现自动化
autoit的Python项目详细描述
用python实现自动化。
这是什么?
这个python 3包旨在帮助您自动化几个gui操作 很容易通过python,比如点击,移动鼠标,使用 键盘等。
看起来怎么样?
importait# Click wherever the mouse isait.click()# Click with the right mouse buttonait.click('R')# Click at some positionait.click(140,480)# Click in the center of the screen with the middle buttonait.click(0.5,0.5,'M')# Click 10 pixels belowait.click(0j,10j)# Movement (absolute, percentage and relative) can also be doneait.move(140,480)ait.move(0.5,0.5)ait.move(60j,-9j)# Mouse position can also be retrievedx,y=ait.mouse()# Pressing keys can also be doneait.press('q','!','\n')# Exit vimait.press(*'\b'*10)# 10 carriage returns# Writing things with the keyboard tooait.write('Hello world!\n')