【问题标题】:Bring an application window gui in front on disktop Python3, tkinter,在 disktop Python3、tkinter、
【发布时间】:2018-05-09 17:27:07
【问题描述】:

在 autoit WinActivate("game gui") 将游戏应用程序带到您的桌面前,有没有办法在 python 3 中做到这一点?还是有一个相等的?我要放在前面的应用是一个mmorpg游戏,比如WinActivate("CABAL")就是这样的。

我尝试过搜索,但找不到答案,我是 python 新手,我使用 tkinter 作为我的 gui。

【问题讨论】:

标签: python-3.x tkinter


【解决方案1】:

我已经找到了解决方案,很简单,代码如下:

from pywinauto.findwindows import find_window
from pywinauto.win32functions import SetForegroundWindow
SetForegroundWindow(find_window(title='gui title'))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多