关闭QQ的脚本
import os import sys import re os.system("Tasklist/SVC>w.txt") f=open(r"w.txt","r") s=f.read() exe1="QQ.exe" pat=exe1+r"\s+(\d+)" r=re.findall(pat,s) for rr in r: os.system("taskkill /f /pid "+rr)
import os import sys import re os.system("Tasklist/SVC>w.txt") f=open(r"w.txt","r") s=f.read() exe1="QQ.exe" pat=exe1+r"\s+(\d+)" r=re.findall(pat,s) for rr in r: os.system("taskkill /f /pid "+rr)