Skip to content

Commit

Permalink
Updated docs to remove references to 'tweens' module.
Browse files Browse the repository at this point in the history
  • Loading branch information
asweigart committed Mar 21, 2017
1 parent 9cd04d3 commit 166b828
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Examples
>>> pyautogui.click()
>>> pyautogui.moveRel(None, 10) # move mouse 10 pixels down
>>> pyautogui.doubleClick()
>>> pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.tweens.easeInOutQuad) # use tweening/easing function to move mouse over 2 seconds.
>>> pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.easeInOutQuad) # use tweening/easing function to move mouse over 2 seconds.
>>> pyautogui.typewrite('Hello world!', interval=0.25) # type with quarter-second pause in between each key
>>> pyautogui.press('esc')
>>> pyautogui.keyDown('shift')
Expand Down
2 changes: 1 addition & 1 deletion docs/mouse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Tweening is an extra feature to make the mouse movements fancy. You can probably

A tween or easing function dictates the progress of the mouse as it moves to its destination. Normally when moving the mouse over a duration of time, the mouse moves directly towards the destination in a straight line at a constant speed. This is known as a *linear tween* or *linear easing* function.

PyAutoGUI has other tweening functions available in the ``pyautogui.tweens`` module. The ``pyautogui.tweens.easeInQuad`` function can be passed for the 4th argument to ``moveTo()``, ``moveRel()``, ``dragTo()``, and ``dragRel()`` functions to have the mouse cursor start off moving slowly and then speeding up towards the destination. The total duration is still the same as the argument passed to the function. The ``pyautogui.tweens.easeOutQuad`` is the reverse: the mouse cursor starts moving fast but slows down as it approaches the destination. The ``pyautogui.tweens.easeOutElastic`` will overshoot the destination and "rubber band" back and forth until it settles at the destination.
PyAutoGUI has other tweening functions available in the ``pyautogui`` module. The ``pyautogui.easeInQuad`` function can be passed for the 4th argument to ``moveTo()``, ``moveRel()``, ``dragTo()``, and ``dragRel()`` functions to have the mouse cursor start off moving slowly and then speeding up towards the destination. The total duration is still the same as the argument passed to the function. The ``pyautogui.easeOutQuad`` is the reverse: the mouse cursor starts moving fast but slows down as it approaches the destination. The ``pyautogui.easeOutElastic`` will overshoot the destination and "rubber band" back and forth until it settles at the destination.

For example:

Expand Down

0 comments on commit 166b828

Please sign in to comment.