安装模块:
1
|
pip install pyautogui |
1
2
3
4
5
6
7
8
9
10
|
import os,time
import pyautogui as pag
while True :
print "Press Ctrl-C to end"
x,y = pag.position()
pos = "Position:" + str (x).rjust( 4 ) + ',' + str (y).rjust( 4 )
print pos
time.sleep( 0.3 )
os.system( 'cls' )
print 'ending....'
|
本文转自 王家东哥 51CTO博客,原文链接:http://blog.51cto.com/xiaodongge/1945280