I am relatively new to python and coding in general. I've created a script to help me perform a repetitive task. My script is perfectly fine, except the part where I literally can't find a way to kill it. My script constantly presses the left and right mouse buttons and I would like a solution to kill it while tabbed out in another tab. I've tried if keyboard.is_pressed('e') break with importing pynput and using the right code (I couldn't really figure out format code well on this website). What solutions can I use? My script as of now is:
while True:
mouse.click(Button.right)
enter code here
time.sleep(0.90)
mouse.click(Button.left)