0

so what im trying to do here is make the button optimize to set the priority of a an app inside task manager .any idea how? btw im not asking for a code im asking for a method of how to do it

import tkinter as tk
from tkinter import *


def optimize():
    
   




MyProgram = tk.Tk()
frame = tk.Frame(MyProgram)
frame.pack()

button = tk.Button(frame, 
                   text="QUIT", 
                   fg="red",
                   command=quit)
button.pack(side=tk.LEFT)
slogan = tk.Button(frame,
                   text="optimize",
                   command=optimize)
slogan.pack(side=tk.LEFT)

MyProgram.mainloop()
  • I think this needs more research effort on your part. https://meta.stackoverflow.com/q/261592/6273251 – Random Davis Jul 16 '21 at 21:32
  • Also I get the feeling that this would involve either automating the GUI inputs required to set a process's affinity, or using ctypes to call SetPriorityClass: https://stackoverflow.com/questions/5216347/how-to-set-the-process-priority-in-c – Random Davis Jul 16 '21 at 21:39

0 Answers0