'Run code after subprocess calls a program?
I am trying to add code after I successfully open a program with a subprocess, but it's not working.
Can anyone tell me why?
import win32api, win32con
import subprocess
subprocess.call(['C:\ProgramData\Microsoft\Windows\Start
Menu\Programs\Adobe Premiere Pro 2022.lnk'],shell=True)
#This code doesn't run after subprocess
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
click(50,40)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|