Python3 よく使うの
import win32gui # 特定のウィンドウをアクティブにする window = win32gui.FindWindow(None, '(無題)1 - sakura 2.4.1.2849') if window != 0: win32gui.SetForegroundWindow(window)
import pyautogui # クリック pyautogui.click(x=100, y=200, button='right', clicks=2, interval=0.25) # スクロール pyautogui.scroll(-10) # キー押下3種 pyautogui.press('enter', presses=3, interval=0.5) with pyautogui.hold('shift'): pyautogui.press(['left', 'left', 'left']) pyautogui.hotkey('ctrl', 'shift', 'esc')
import pyperclip # クリップボード pyperclip.copy('aaaaaaaaaa') s = pyperclip.paste()
WinPython
WinPython本体
pip
「WinPython Command Prompt.exe」で叩く。
名 | install | 使い方・参考 |
---|---|---|
pyautogui | pip install pyautogui | Welcome to PyAutoGUI’s documentation! — PyAutoGUI documentation |
win32gui | pip install pywin32 | 【Python】ウィンドウをアプリ名指定しアクティブ切り替えする簡単な方法 |
pyperclip | pip install pyperclip | Python, pyperclipでクリップボードを操作(コピー、ペースト、監視) | note.nkmk.me |
requests | pip install requests | Python, Requestsの使い方 | note.nkmk.me |
bs4 | pip install beautifulsoup4 | 【Python】猫でも出来るWebスクレイピングの基礎【BeautifulSoup4】 #Python - Qiita |
pypdf | pip install pypdf | Python, pypdfでPDFを結合・分割(ファイル全体・個別ページ) | note.nkmk.me |
pandas | pip install pandas | pandasに関する情報 | note.nkmk.me |
selenium | pip install selenium | Selenium Pythonのインストール |
tqdm | pip install tqdm | tqdmでプログレスバーを表示させる #Python - Qiita |
PySimpleGUI | pip install PySimpleGUI | PySimpleGUI/readme.ja.md at master · PySimpleGUI/PySimpleGUI · GitHub |
pyinstaller | pip install pyinstaller | PyInstaller Manual — PyInstaller 6.3.0 documentation |