It’s kinda hard to explain, but I will try my best.
I have this part on my code
def hideConsole():
hideConsole = win32console.GetConsoleWindow()
win32gui.ShowWindow(hideConsole, 0)
which hides the console, and I have this part to enable it
def onKeyboardEvent(event):
if event.KeyID == 192 and event.Alt == 32:
hideConsole()
return True
how can I make a “system” where when I press the key combination one time, the console hides, and the next time, the console will show up? (change the hideConsole, 1 value)
You can use a function attribute that you switch between true and false on each call:
Here is a quick example of how this works: