絞り込み条件を変更する
検索条件を絞り込む

すべてのカテゴリ

7 件中 1 - 7 件表示
カバー画像

画像

Import import pyautoguifrom pyautogui import ImageNotFoundException取得with pyautogui.screenshot() as img: ピクセル RGBpyautogui.pixel(x, y)img.getpixel((x, y)))位置pyautogui.locateOnScreen(画像ファイルのパス) 戻り値 (x, y, 幅, 高さ)     見つからなければ ImageNotFoundException※ 画像はサイズが一致する必要がある 誤差を許容pyautogui.locateOnScreen(画像ファイルのパス, confidence=精度)精度は 1 が100%、 0 が0% 中央の座標pos = pyautogui.locateOnScreen(画像ファイルのパス) x, y = pyautogui.center(pos) 複数pyautogui.locateAllOnScreen(画像ファイルのパス)  誤差を許容 pyautogui.locateAllOnScreen(画像ファイルのパス, confidence=精度) 精度は 1 が100%、 0 が0%チェック 座標がRGBと一致するif pyautogui.pixelMatchesColor(x, y, (R, G, B)):  誤差を許容pyautogui.pixelMatchesColor(x, y, rgb, tolerance=誤差): スクリーンショット時にRGB値が1~5ずれることがある 画像が画面内にあるdef
0
カバー画像

画面

Importimport pyautogui サイズ width, height = pyautogui.size()
0
カバー画像

キーの名前

Altalt Backspace backspace CTrl ctrl Delete delete End end Enter enter Esc esc Home home PageUp, PageDownpageup pagedown Shift shift Tab tab 矢印 updownleftright
0
カバー画像

キーボード

Importimport pyautogui import pyperclip入力  テキストpyautogui.typewrite(文字列) ※ 日本語に対応していない  日本語 pyperclip.copy(文字列) pyautogui.hotkey("ctrl", "V") ボタン pyautogui.press("キー")  複数pyautogui.press(["キー1", ...])  同時押しpyautogui.hotkey("キー1", ...)同時押しして離す
0
カバー画像

マウス

Importimport pyautogui 移動 pyautogui.moveTo(x, y)  移動にかかる秒数を指定 pyautogui.moveTo(x, y, duration=秒)  相対移動 pyautogui.moveRel(x, y) -座標を指定できる  移動時間を指定 pyautogui.moveRel(x, y, duration=秒)スクロール pyautogui.scroll(数値) +で上 -で下クリック 左 pyautogui.leftClick() pyautogui.click() pyautogui.click(button='left')  右 pyautogui.rightClick() pyautogui.click(button='right')  ダブルクリック pyautogui.doubleClick()  座標を指定 pyautogui.クリック(x=x座標, y=y座標) ドラッグ pyautogui.dragTo(x, y) 相対移動pyautogui.dragRel(x, y)  移動時間を指定 pyautogui.ドラッグ(x, y, duration=秒)位置 x, y = pyautogui.position() pos = pyautogui.position() x = pos.xy = pos.y マウスカーソルの現在の座標とRGBを表示する pyautogui.displayMousePosition()
0
カバー画像

座標

Importimport pyautogui 中央 pyautogui.center((x, y, 幅, 高さ)) x, y は左上 戻り値は (x, y)原点画面の左上 (0, 0) x座標 右に行くほど増える y座標 下に行くほど増える
0
カバー画像

PyAutoGUI

Importimport pyautogui 待機 pyautogui.PAUSE = 秒 関数呼び出しごとに待機する Installpip install pyautogui
0
7 件中 1 - 7