Closed Karol-G closed 4 years ago
Hi @Karol-G I had the same issue before, you have to import the PyAutoGui after starting your virtual Display not before.
Hi, thanks for the extremly quick answer 👍 It works now. I started the virtual display in a function so I had to define the import as global:
def setup_headless(self):
if self.headless:
disp = Display(visible=False, size=(1000, 1300)).start()
global pyautogui
import pyautogui
Best Karol
Hi,
I want to automate a little program. However when using PyAutoGui for sending key strokes and moving/clicking with the mouse the actions happen on my real display and not the virtual one. How can I achieve that these events are executed inside the virtual display? I tried vncdotool already, however the application seems to be not really supported/working anymore :(
Best Karol