Загрузка...

Can't automate program

Thread in Python created by Smoke22431 May 5, 2020. 228 views

  1. Smoke22431
    Smoke22431 Topic starter May 5, 2020 4 Sep 6, 2019
    Огромная ошибка, в которой я мало, что понимаю
    Code
    import pyautogui

    import time
    screenWidth, screenHeight = pyautogui.size()
    currentMouseX, currentMouseY = pyautogui.position()

    print ("Ширина -- " + str(screenWidth))
    print()
    print ("Высота -- " + str(screenHeight))

    print('Мышь находится по X -- ' + str(currentMouseX))
    print()
    print('Мышь находится по Y -- ' + str(currentMouseY))

    print()

    a1 = print(screenWidth // 2)
    b1 = print(screenHeight // 2)

    a2 = input('Введите первое число: ')
    b2 = input('Введите второе число: ')

    pyautogui.moveTo(a2, b2, duration=2, tween=pyautogui.easeInOutQuad)
    Ошибка:
    OSError: Failed to read 34 because file is missing, has improper permissions, or is an unsupported or invalid format
     
  2. oriole
    oriole May 5, 2020 был(а) давно
    это весь код ?
     
    1. View previous comments (3)
    2. Smoke22431 Topic starter
      oriole, в последней
    3. oriole
      Smoke22431, мейби из-за того что у тебя а2 и б2 это строки , а не числа ?
      сделай int(a2), int(b2)
    4. Smoke22431 Topic starter
      oriole, Да! Спасибо, я очень благодарен:pepeshapka:
Top
Loading...