import time
winTitle = window.get_active_title() winClass = window.get_active_class()
clipboard.fill_clipboard(toClip) # https://github.com/autokey/autokey/wiki/API-Examples#clipboard
keyboard.send_keys("+c")
dialog.info_dialog("Window information", "Active window information:\nTitle: '%s'\nClass: '%s'" % (winTitle, winClass))
Activate the specified window, giving it input focus. https://autokey.github.io/index.html
Title = '[GitHub] Please verify your device - sl5softwarelab@gmail.com - Gmail - Mozilla Firefox'
Title = '~ : bash — Konsole' Class = 'konsole.konsole' window.activate(Title, switchDesktop=False, matchClass=False) time.sleep(0.2) fromClip = clipboard.get_clipboard()
time.sleep(0.2) if True: keyboard.send_keys("++v") # works :) else: keyboard.press_key("") keyboard.send_keys("v") keyboard.release_key("")
keyboard.send_keys("")
window.activate(winTitle, switchDesktop=False, matchClass=False) # activates the window with 'Atom' as part of the window title.
dont work: window.activate(winClass + "." + winTitle, switchDesktop=False, matchClass=False) # activates the window with 'atom.Atom' as its class name.
time.sleep(0.2) window.activate(winTitle, switchDesktop=False, matchClass=False) # activates the window with 'atom.Atom' as its class name.