Created
July 12, 2023 11:36
-
-
Save IvanaGyro/0de444033bb8e7f8dd31fbba556ed877 to your computer and use it in GitHub Desktop.
A pywinauto example for toggling the hotkey feature of Intel® Graphics Command Center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is an workaround for the hotkey binding problem reported in 2020.09. | |
# See: https://community.intel.com/t5/Graphics/Keyboard-problem-with-quot-Intel-Graphics-Command-Center-quot/m-p/1212469 | |
from pywinauto.application import Application | |
from pywinauto.timings import always_wait_until_passes | |
main_app = Application(backend='uia').start('explorer.exe shell:appsFolder\AppUp.IntelGraphicsExperience_8j3eq9eme6ctt!App') | |
@always_wait_until_passes(30, 1) | |
def toggle_hotkey(): | |
app = Application(backend='uia').connect(title_re='Intel.*') | |
main_window = app.window(title_re='Intel.*') | |
system_itme = main_window['顯示晶片控制中心Dialog'].child_window(title="系統", control_type="ListItem") | |
system_itme.select() | |
hotkey_tab = main_window['快速鍵TabItem'] | |
hotkey_tab.select() | |
hotkey_button = hotkey_tab.child_window(title="啟用系統快速鍵", control_type="Button") | |
hotkey_button.toggle() | |
hotkey_button.toggle() | |
main_window.close() | |
toggle_hotkey() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment