Basically i’m trying to use the pyautogui for a simple program, but it just does not work.
when i try to click on a website with pyautogui the mouse does not leave the terminal/CodeEditor.
i’m using the debian 12 with gnome.
i’m using the vscode.
import gi, pyautogui
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
class App(Gtk.Window):
def __init__(self):
#Configurando a janela
super().__init__(title='004')
self.set_default_size(300, 300)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_resizable(False)
self.set_border_width(1)
self.connect("destroy", Gtk.main_quit)
#Botões
self.btFechar = Gtk.Button(label='Iniciar')
def Bt1(self):
pyautogui.click(1711,150)
pyautogui.typewrite("Hello, world!", interval=0.25)
self.btFechar.connect("clicked", Bt1)
self.add(self.btFechar)
# Finalizando
self.show_all() # Esta Linha Mostra Tudo Da Janela
app = App()
Gtk.main()
just click and write
New contributor
Carlos Eduardo Porto Da Hora is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.