0

I was planning to create an automatization using pyautogui. When I want to write a website address to Chrome's address bar via typewrite()function of Pyautogui, the letter 'e' brings the emoji menu. Therefore, it cannot type the address. How can I fix it? Does anybody encountered this situation?

def navigate_to_cancel_requests():

    pyautogui.typewrite('e', interval=0.5)
    pyautogui.press('enter')
    time.sleep(2)

This writes it to an address bar. And there is no cmd or ctrl button down when using this function.

I tried both typerwrite()and write()functions. I did not use any keyDowns.

Sam Brown
  • 21
  • 3

1 Answers1

0

I know this in not the best solution, but it helped me.

Just before pyautogui.write() I used pyautogui.keyUp('Fn')

def navigate_to_cancel_requests():
    pyautogui.keyUp('Fn')
    pyautogui.typewrite('e', interval=0.5)
    pyautogui.press('enter')
    time.sleep(2)
Kira Bond
  • 1
  • 1