## pyautogui
### 圖塊區域region的表示
下面的函數可以返回圖片所在區域的坐標:
```
pos = pyautogui.locateOnScreen(step['img'], confidence=step['confidence'], region=region)
```
返回坐標示例:
```
Box(left=893, top=676, width=140, height=38)
```
該坐標表達的含義如下圖:

> pyautogui中,region(left,top,width,height)在屏幕上的含義,也是這樣的。
### 坐標point
根據location可以使用center函數獲取point。
```
>>> import pyautogui
>>> button7location = pyautogui.locateOnScreen('calc7key.png')
>>> button7location
Box(left=1416, top=562, width=50, height=41)
>>> button7point = pyautogui.center(button7location)
>>> button7point
Point(x=1441, y=582)
```
## 缺點
1. 對擴展屏支持不好;比如:擴展屏的范圍用region表示為:(-1920,0,1920,1080),截屏結果是全黑色的。
2. pyautogui.write(text)函數中的text字符不支持中文。