Browse Source

Update 'README.md'

天问 11 months ago
parent
commit
046206581a
1 changed files with 32 additions and 1 deletions
  1. 32 1
      README.md

+ 32 - 1
README.md

@@ -24,13 +24,44 @@ pyautogui.moveTo(pyautogui.size()[0] / 2, pyautogui.size()[1] / 2)
 # 等待1秒钟
 time.sleep(1)
 
+# 获取鼠标位置
+pyautogui.position()
+
+
+
 # 在当前位置点击鼠标
-pyautogui.click()
+pyautogui.click(x,y ,clicks=num, interval=1, button= 'left')
+
+# 移动鼠标,移动到(x,y)位置,持续时间seconds秒
+pyautogui.moveTo(x,y, duration=seconds, tween=pyautogui.easeInOutQuad)
+# 移动鼠标,x_offset移动水平距离,正右移,负左移
+pyautogui.moveRel(x_offset,y_offset,duration=seconds)
+
+# 拖拽鼠标
+pyautogui.dragTo(x,y, duration=seconds)
+pyautogui.dragRel(x,y, duration=seconds)
+
+# 滚轮
+pyautogui.scrool(x,y,clicks=num)
+
 
+# 键盘
+
+pyautogui.keyDown(key)
+pyautogui.keyUp(key)
+
+
+pyautogui.typewrite('hello worlld')
 pyautogui.write("胜多负少")
 # 调用函数输入中文
 type_chinese("你好,世界!")
 
 pyautogui.press('space') 
+
+# 截屏
+pyautogui.screenshot('xx.png')
+pyautogui.locationOnScreen('xx.png')
+
+
 ```