Задать вопрос
@sue132324

How to make the script work together with other buttons on the keyboard, i used pyautogui, keyboard?

in the game when I stand still and press' q
then the script works for me, but if I press the buttons on the keyboard and press q nothing happens

script:

import pyautogui
import keyboard

while True:
            keyboard.wait('q')

            pyautogui.press('3')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('4')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('5')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('1')
        
            keyboard.wait('q')

            pyautogui.press('6')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('7')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('8')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('9')
            pyautogui.click(button='right', clicks=3, interval=0.02)

            pyautogui.press('1')


how to make the script work together with other buttons on the keyboard, I used pyautogui, keyboard
  • Вопрос задан
  • 57 просмотров
Подписаться 1 Простой Комментировать
Помогут разобраться в теме Все курсы
  • Нетология
    Fullstack-разработчик на Python + нейросети
    20 месяцев
    Далее
  • Skillfactory
    Профессия Python-разработчик
    9 месяцев
    Далее
  • SF Education
    Бэкенд-разработчик на Python
    3 месяца
    Далее
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы