1

In autoit WinActivate("game gui") is bringing the game applications in front of your desktop, is there a way to do this in python 3? or is there an equal to this?. the application that i want to bring in front is an mmorpg game, for example, WinActivate("CABAL") just like that.

i have tried searching and i cant find answers, i am new in python, and i ma using tkinter for my gui.

  • probably `Tkinter` can't do it with other windows than `tkinter's window - - and it can depend on Operation System. For Windows can be useful [Windows 7: how to bring a window to the front no matter what other window has focus?](https://stackoverflow.com/questions/6312627/windows-7-how-to-bring-a-window-to-the-front-no-matter-what-other-window-has-fo) – furas Nov 26 '17 at 10:03

1 Answers1

1

I have found the solution for this and it's so simple, here's the code:

from pywinauto.findwindows import find_window
from pywinauto.win32functions import SetForegroundWindow
SetForegroundWindow(find_window(title='gui title'))
Josh Dinsdale
  • 365
  • 3
  • 15