socreqop.blogg.se

Ahk key list
Ahk key list









reg_read( r'HKEY_CURRENT_USER\SOFTWARE\my-software') # 'test' ahk. reg_write( 'REG_SZ', r'HKEY_CURRENT_USER\SOFTWARE\my-software', value_name = 'foo', value = 'bar')Īhk. reg_write( 'REG_SZ', r'HKEY_CURRENT_USER\SOFTWARE\my-software', value = 'test')Īhk. id) # the ahk_id of the window print( window. get_position()) # (x, y, width, height) print( window. always_on_top = 'On' # Make the window always on top # or win. to_bottom() # Move the window to the bottom of the other windows win. to_top() # Move the window on top of other windows win. disable() # Make the window non-interactable win. send( 'hello') # Send keys directly to the window (does not need focus!) win. find_window( title = 'Untitled - Notepad') # Find the opened window win. run_script( 'Run Notepad') # Open notepad win = ahk. In addition to Hotstrings supporting normal AHK string replacements, you can also provide Python callbacks (with optional exception handlers) in response to hotstrings triggering.Īhk. Hotstrings can also be added to the hotkey process thread. See also the relevant AHK documentation Hotstrings If hotkeys or hotstrings are added while the process is running, the underlying AHK process is restarted automatically.Hotstrings (discussed below) share the same process with hotkeys and are started/stopped in the same manner.Hotkeys can be stopped with ahk.stop_hotkeys() (will not stop actively running callbacks).

ahk key list

Hotkeys run in a separate process that must be started manually (with ahk.start_hotkeys()).add_hotkey( '#n', callback = go_boom, ex_handler = my_ex_handler) Print( 'exception with callback for hotkey', hotkey, 'Here was the error:', exception)Īhk. Def my_ex_handler( hotkey: str, exception: Exception):











Ahk key list