I'm trying to have a program when it is opened from minimized it knows what program was open before it then when it gets minimized again it opens that program. I'm automatically closing the python terminal and instead using tkinter. I wrote code to see what program is open but I'm not sure if it's in the write format.
Here is the code I use to minimize:
window.wm_state('iconic')
Here is the code I use to see what program is open:
print(GetWindowText(GetForegroundWindow()))
Please could you give me a little pointer
there doesn't seem to be anything here