Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the still working HTTP URLs for HTTPS ones and replace some URLs with the ones they redirect to #794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Pillow needs to be installed, and on Linux you may need to install additional li

https://stackoverflow.com/questions/7648200/pip-install-pil-e-tickets-1-no-jpeg-png-support

http://ubuntuforums.org/showthread.php?t=1751455
https://ubuntuforums.org/showthread.php?t=1751455

If you want to do development and contribute to PyAutoGUI, you will need to install these modules from PyPI:

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/en/master/)
endif

# Internal variables.
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

Expand Down Expand Up @@ -155,4 +155,4 @@
(master_doc, 'PyAutoGUI', 'PyAutoGUI Documentation',
author, 'PyAutoGUI', 'One line description of project.',
'Miscellaneous'),
]
]
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if errorlevel 9009 (
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
echo.https://www.sphinx-doc.org/en/master/
exit /b 1
)

Expand Down
10 changes: 5 additions & 5 deletions docs/simplified-chinese.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"本教程译自大神[Al Sweigart](http://inventwithpython.com/)的[PyAutoGUI](https://pyautogui.readthedocs.org/)项目,Python自动化工具,更适合处理GUI任务,网页任务推荐:\n",
"本教程译自大神[Al Sweigart](https://inventwithpython.com/)的[PyAutoGUI](https://pyautogui.readthedocs.org/)项目,Python自动化工具,更适合处理GUI任务,网页任务推荐:\n",
"- [Selenium](https://selenium-python.readthedocs.org/)+Firefox记录(Chromedriver和Phantomjs也很给力,Phantomjs虽然是无头浏览器,但有时定位不准),然后用Python写单元测试\n",
"- [request](http://www.python-requests.org/en/latest/)处理get/post请求写一堆代码自动化处理,都在后台运行,不用运行浏览器,非常适合处理表单\n",
"\n",
"没有[sikuli](http://www.sikuli.org/)功能多,但是Python让生活更简单,[人生苦短,Python当歌](http://cn.pycon.org/2015/)。\n",
"没有[sikuli](http://www.sikuli.org/)功能多,但是Python让生活更简单,[人生苦短,Python当歌](https://cn.pycon.org/2015/)。\n",
"\n",
"同时推荐一本Python网络数据采集(图灵社区取的名字^_^)的基础书籍[Ryan Mitchell的《Web Scraping with Python》](http://shop.oreilly.com/product/0636920034391.do),可以和PyAutoGUI结合使用。\n",
"同时推荐一本Python网络数据采集(图灵社区取的名字^_^)的基础书籍[Ryan Mitchell的《Web Scraping with Python》](https://www.oreilly.com/library/view/web-scraping-with/9781491910283/),可以和PyAutoGUI结合使用。\n",
"\n",
"tl;dr\n",
"\n",
Expand Down Expand Up @@ -1743,7 +1743,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"由于Ubuntu上安装Pillow时缺少PNG和JPEG依赖,所以安装比较复杂,具体可以看[Ubuntu论坛](http://conda.pydata.org/miniconda.html)。不过用[miniconda](http://conda.pydata.org/miniconda.html)可以解决这些问题,如果Ubuntu或Mint上安装了miniconda,可以直接`conda install pillow`来安装。"
"由于Ubuntu上安装Pillow时缺少PNG和JPEG依赖,所以安装比较复杂,具体可以看[Ubuntu论坛](https://docs.conda.io/en/latest/miniconda.html)。不过用[miniconda](https://docs.conda.io/en/latest/miniconda.html)可以解决这些问题,如果Ubuntu或Mint上安装了miniconda,可以直接`conda install pillow`来安装。"
]
},
{
Expand All @@ -1757,7 +1757,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`screenshot()`函数会返回`Image`对象(参考[Pillow或PIL模块文档](http://python-pillow.github.io/)),也可以设置文件名:"
"`screenshot()`函数会返回`Image`对象(参考[Pillow或PIL模块文档](https://python-pillow.org/)),也可以设置文件名:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion pyautogui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def isShiftCharacter(character):
# the mouse.
MINIMUM_DURATION = 0.1
# If sleep_amount is less than MINIMUM_DURATION, time.sleep() will be a no-op and the mouse cursor moves there instantly.
# TODO: This value should vary with the platform. http://stackoverflow.com/q/1133857
# TODO: This value should vary with the platform. https://stackoverflow.com/q/1133857
MINIMUM_SLEEP = 0.05

# The number of seconds to pause after EVERY public function call. Useful for debugging:
Expand Down
4 changes: 2 additions & 2 deletions pyautogui/_pyautogui_osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
keyboardMapping[c.upper()] = keyboardMapping[c]

# Taken from ev_keymap.h
# http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-86.1/IOHIDSystem/IOKit/hidsystem/ev_keymap.h
# https://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-86.1/IOHIDSystem/IOKit/hidsystem/ev_keymap.h
special_key_translate_table = {
'KEYTYPE_SOUND_UP': 0,
'KEYTYPE_SOUND_DOWN': 1,
Expand Down Expand Up @@ -264,7 +264,7 @@ def _normalKeyEvent(key, upDown):
def _specialKeyEvent(key, upDown):
""" Helper method for special keys.

Source: http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
Source: https://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
"""
assert upDown in ('up', 'down'), "upDown argument must be 'up' or 'down'"

Expand Down
14 changes: 7 additions & 7 deletions pyautogui/_pyautogui_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"""
A lot of this code is probably repeated from win32 extensions module, but I didn't want to have that dependency.

Note: According to http://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx
Note: According to https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event?redirectedfrom=MSDN
the ctypes.windll.user32.mouse_event() function has been superseded by SendInput.

SendInput() is documented here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
SendInput() is documented here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput?redirectedfrom=MSDN

UPDATE: SendInput() doesn't seem to be working for me. I've switched back to mouse_event()."""


# Event codes to be passed to the mouse_event() win32 function.
# Documented here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646273(v=vs.85).aspx
# Documented here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-mouseinput?redirectedfrom=MSDN
MOUSEEVENTF_MOVE = 0x0001
MOUSEEVENTF_LEFTDOWN = 0x0002
MOUSEEVENTF_LEFTUP = 0x0004
Expand All @@ -47,17 +47,17 @@
MOUSEEVENTF_WHEEL = 0x0800
MOUSEEVENTF_HWHEEL = 0x01000

# Documented here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646304(v=vs.85).aspx
# Documented here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-keybd_event?redirectedfrom=MSDN
KEYEVENTF_KEYDOWN = 0x0000 # Technically this constant doesn't exist in the MS documentation. It's the lack of KEYEVENTF_KEYUP that means pressing the key down.
KEYEVENTF_KEYUP = 0x0002

# Documented here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
# Documented here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-input?redirectedfrom=MSDN
INPUT_MOUSE = 0
INPUT_KEYBOARD = 1


# These ctypes structures are for Win32 INPUT, MOUSEINPUT, KEYBDINPUT, and HARDWAREINPUT structures,
# used by SendInput and documented here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
# used by SendInput and documented here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-input?redirectedfrom=MSDN
# Thanks to BSH for this StackOverflow answer: https://stackoverflow.com/questions/18566289/how-would-you-recreate-this-windows-api-structure-with-ctypes
class MOUSEINPUT(ctypes.Structure):
_fields_ = [
Expand Down Expand Up @@ -103,7 +103,7 @@ class _I(ctypes.Union):


""" Keyboard key mapping for pyautogui:
Documented at http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
Documented at https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes?redirectedfrom=MSDN

The *KB dictionaries in pyautogui map a string that can be passed to keyDown(),
keyUp(), or press() into the code used for the OS-specific keyboard function.
Expand Down
2 changes: 1 addition & 1 deletion pyautogui/_pyautogui_x11.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#from pyautogui import *

"""
Much of this code is based on information gleaned from Paul Barton's PyKeyboard in PyUserInput from 2013, itself derived from Akkana Peck's pykey in 2008 ( http://www.shallowsky.com/software/crikey/pykey-0.1 ), itself derived from her "Crikey" lib.
Much of this code is based on information gleaned from Paul Barton's PyKeyboard in PyUserInput from 2013, itself derived from Akkana Peck's pykey in 2008 (https://shallowsky.com/software/crikey/pykey-0.1), itself derived from her "Crikey" lib.
"""

def _position():
Expand Down