Hello,
On Windows at least, I wonder if Python can 1) find a window, and 2) simulate typing keys.
Currently, I run an AutoIt just for this, so it'd be nice if I can remove that dependency.
Thank you.
Edit: There appears to be at least two modules to automate Windows apps: pywinauto and pyautogui
On Windows at least, I wonder if Python can 1) find a window, and 2) simulate typing keys.
Currently, I run an AutoIt just for this, so it'd be nice if I can remove that dependency.
Thank you.
#Python
result = subprocess.run(AUTOIT, capture_output=True, text=True)
#AutoIt
;chrome://extensions/shortcuts
Opt("WinTitleMatchMode", 2) ;1=start (default), 2=subStr, 3=exact, 4=advanced (deprecated), -1 to -4=Nocase
_WinWaitActivate("[TITLE: - Google Chrome;CLASS:Chrome_WidgetWin_1]","")
;click on extension and fill: Assigned CTRL+SHIFT+P to extension
Send("{CTRLDOWN}{SHIFTDOWN}p{CTRLUP}{SHIFTUP}")
Sleep(500)
Send("{TAB}" & $sTitle & "{TAB}" & $sAuthor & "{TAB}{ENTER}")--Edit: There appears to be at least two modules to automate Windows apps: pywinauto and pyautogui
