1

I am using a Chromebook to code python. I made a script which makes it so that it looks up something in google. This is the current code:

import pyautogui as pag
import time
time.sleep(3)

pag.typewrite('is that a tomato?', interval=0.03)
pag.press('enter')
print('Working code.')

If I run this program in Visual Studio Code, it types correctly. But if I open google chrome, it doesn't type "Is that a tomato?", but it prints "Working code".

I even tried a code that moves the mouse pointer and the result is the same. But if I use any other function that doesn't interact with Mouse/keyboard, pyautogui works fine. I think that the Chromebook is not giving VSC permission to use the mouse/keyboard. Please help me to give Visual studio code permission. Thank you in advance :D

1 Answers1

0

I just tested it, and it works in a limited way.
Keyboard: Does not work in Chrome tabs, only in others(like linux apps)
Mouse: There are many errors.

kdh8219
  • 7
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 23 '22 at 17:37