I'm still a newbie, don't be angry if I make some mistakes :) So, I wanted to code an auto clicker with a little interface, where I can enter the size of the interval between each click. Here's the code:
import pyautogui
import appJar
pyautogui.PAUSE = 0.01
def buttonPress(button):
if (button == "Go"):
amount = float(app.getEntry("amount"))
button = app.radioButton("click")
if (button == "Right Click"):
button = "right"
else:
button = "left"
pyautogui.click(button=button, interval=amount)
app = appJar.gui("autoclicker")
app.setSize("300x200")
app.setSticky("new")
app.addLabel("Enter size of Intervall between clicks", row=0)
app.addEntry("amount", row=1)
app.addButton("Go", buttonPress, row=3)
app.setSticky("e")
app.radioButton("click", "Right Click", row=2)
app.setSticky("w")
app.radioButton("click", "Left Click", row=2)
app.go()
When I run it, the little window opens, I enter the interval, and press "Go". Nothing happens. What did I do wrong?