## 鼠标坐标位置的获取
```python
import os
import time
import pyautogui as pag
''' 功能:获取坐标'''
try:
while True:
print("Press Ctrl-C to end")
screenWidth, screenHeight = pag.size() #获取屏幕的尺寸
print(screenWidth,screenHeight)
ptx,pty = pag.position() #获取当前鼠标的位置
showStr = "Position:" + str(ptx).rjust(4)+','+str(pty).rjust(4)
print(showStr) ###
time.sleep(0.5)
os.system('cls') #清除屏幕
except KeyboardInterrupt:
print('end....')
```
## 键盘操作
### wright()
经过测试,pyautogui的wright()函数对中文的支持不好。