from pynput.mouse import Button,Controller
import webbrowser
import time
mouse=Controller()
url = 'google.com'
chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
mouse.position = (1500, 55)
mouse.press(Button.left)
mouse.release(Button.left)
mouse.position = (1400, 270)
mouse.press(Button.left)
mouse.release(Button.left)
#has now exited vscode and stopped running
mouse.position(1000,100)
mouse.press(Button.left)
mouse.release(Button.left)
#webbrowser.get(chrome_path).open(url)
I initially thought it was not working because it was attempting to run all the cursor movements simultaneously, but it did not appear to be that, and exiting vscode seemed like the only possible issue.