Pembungkus python yang diketik sepenuhnya di sekitar autohotkey.
pip install ahk
Membutuhkan Python 3.8+
Mendukung Autohotkey V1 dan V2. Lihat juga: Ketergantungan Non-Python
from ahk import AHK
ahk = AHK ()
ahk . mouse_move ( x = 100 , y = 100 , blocking = True ) # Blocks until mouse finishes moving (the default)
ahk . mouse_move ( x = 150 , y = 150 , speed = 10 , blocking = True ) # Moves the mouse to x, y taking 'speed' seconds to move
print ( ahk . mouse_position ) # (150, 150)Contoh yang tidak lengkap dari beberapa fungsi yang tersedia dengan paket ini. Lihat dokumentasi lengkap untuk referensi API lengkap dan fitur tambahan.
Hotkeys dapat dikonfigurasi untuk menjalankan fungsi Python sebagai panggilan balik.
Misalnya:
from ahk import AHK
def my_callback ():
print ( 'Hello callback!' )
ahk = AHK ()
# when WIN + n is pressed, fire `my_callback`
ahk . add_hotkey ( '#n' , callback = my_callback )
ahk . start_hotkeys () # start the hotkey process thread
ahk . block_forever () # not strictly needed in all scripts -- stops the script from exiting; sleep forever Sekarang setiap kali Anda menekan + n , fungsi panggilan balik my_callback akan dipanggil di utas latar belakang.
Anda juga dapat menambahkan penangan pengecualian untuk panggilan balik Anda:
from ahk import AHK
ahk = AHK ()
def go_boom ():
raise Exception ( 'boom!' )
def my_ex_handler ( hotkey : str , exception : Exception ):
print ( 'exception with callback for hotkey' , hotkey , 'Here was the error:' , exception )
ahk . add_hotkey ( '#n' , callback = go_boom , ex_handler = my_ex_handler )Ada juga metode untuk menghapus hotkeys:
# ...
ahk . remove_hotkey ( '#n' ) # remove a hotkey by its keyname
ahk . clear_hotkeys () # remove all hotkeysPerhatikan bahwa:
ahk.start_hotkeys() )ahk.stop_hotkeys() (tidak akan berhenti secara aktif menjalankan panggilan balik)Lihat juga dokumentasi AHK yang relevan
Hotstrings juga dapat ditambahkan ke utas proses hotkey.
Selain hotstring yang mendukung penggantian string AHK normal, Anda juga dapat memberikan callback python (dengan penangan pengecualian opsional) sebagai respons terhadap pemicu hotstring.
from ahk import AHK
ahk = AHK ()
def my_callback ():
print ( 'hello callback!' )
ahk . add_hotstring ( 'btw' , 'by the way' ) # string replacements
ahk . add_hotstring ( 'btw' , my_callback ) # call python function in response to the hotstringAnda juga dapat menghapus panasnya:
ahk . remove_hotstring ( 'btw' ) # remove a hotstring by its trigger sequence
ahk . clear_hotstrings () # remove all registered hotstrings from ahk import AHK
ahk = AHK ()
ahk . mouse_position # Returns a tuple of mouse coordinates (x, y) (relative to active window)
ahk . get_mouse_position ( coord_mode = 'Screen' ) # get coordinates relative to the screen
ahk . mouse_move ( 100 , 100 , speed = 10 , relative = True ) # Moves the mouse reletave to the current position
ahk . mouse_position = ( 100 , 100 ) # Moves the mouse instantly to absolute screen position
ahk . click () # Click the primary mouse button
ahk . click ( 200 , 200 ) # Moves the mouse to a particular position and clicks (relative to active window)
ahk . click ( 100 , 200 , coord_mode = 'Screen' ) # click relative to the screen instead of active window
ahk . click ( button = 'R' , click_count = 2 ) # Clicks the right mouse button twice
ahk . right_click () # Clicks the secondary mouse button
ahk . mouse_drag ( 100 , 100 , relative = True ) # Holds down primary button and moves the mouse from ahk import AHK
ahk = AHK ()
ahk . type ( 'hello, world!' ) # Send keys, as if typed (performs string escapes for you)
ahk . send_input ( 'Hello, {U+1F30E}{!}' ) # Like AHK SendInput
# Unlike `type`, control sequences must be escaped manually.
# For example the characters `!^+#=` and braces (`{` `}`) must be escaped manually.
ahk . key_state ( 'Control' ) # Return True or False based on whether Control key is pressed down
ahk . key_state ( 'CapsLock' , mode = 'T' ) # Check toggle state of a key (like for NumLock, CapsLock, etc)
ahk . key_press ( 'a' ) # Press and release a key
ahk . key_down ( 'Control' ) # Press down (but do not release) Control key
ahk . key_up ( 'Control' ) # Release the key
ahk . set_capslock_state ( "On" ) # Turn CapsLock on
if ahk . key_wait ( 'x' , timeout = 3 ): # wait for a key to be pressed; returns a boolean
print ( 'X was pressed within 3 seconds' )
else :
print ( 'X was not pressed within 3 seconds' )Anda dapat melakukan hal -hal dengan Windows juga.
from ahk import AHK
ahk = AHK ()
win = ahk . active_window # Get the active window
win = ahk . win_get ( title = 'Untitled - Notepad' ) # by title
all_windows = ahk . list_windows () # list of all windows
win = ahk . win_get_from_mouse_position () # the window under the mouse cursor
win = ahk . win_get ( title = 'ahk_pid 20366' ) # get window from pid
# Wait for a window
try :
# wait up to 5 seconds for notepad
win = ahk . win_wait ( title = 'Untitled - Notepad' , timeout = 5 )
# see also: win_wait_active, win_wait_not_active
except TimeoutError :
print ( 'Notepad was not found!' ) from ahk import AHK
ahk = AHK ()
ahk . run_script ( 'Run Notepad' ) # Open notepad
win = ahk . find_window ( title = 'Untitled - Notepad' ) # Find the opened window; returns a `Window` object
# Window object methods
win . send ( 'hello' , control = 'Edit1' ) # Send keys directly to the window (does not need focus!)
# OR ahk.control_send(title='Untitled - Notepad', control='Edit1')
win . move ( x = 200 , y = 300 , width = 500 , height = 800 )
win . activate () # Give the window focus
win . close () # Close the window
win . hide () # Hide the window
win . kill () # Kill the window
win . maximize () # Maximize the window
win . minimize () # Minimize the window
win . restore () # Restore the window
win . show () # Show the window
win . disable () # Make the window non-interactable
win . enable () # Enable it again
win . to_top () # Move the window on top of other windows
win . to_bottom () # Move the window to the bottom of the other windows
win . get_class () # Get the class name of the window
win . get_minmax () # Get the min/max status
win . get_process_name () # Get the process name (e.g., "notepad.exe")
win . process_name # Property; same as `.get_process_name()` above
win . is_always_on_top () # Whether the window has the 'always on top' style applied
win . list_controls () # Get a list of controls (list of `Control` objects)
win . redraw () # Redraw the window
win . set_style ( "-0xC00000" ) # Set a style on the window (in this case, removing the title bar)
win . set_ex_style ( "^0x80" ) # Set an ExStyle on the window (in this case, removes the window from alt-tab list)
win . set_region ( "" ) # See: https://www.autohotkey.com/docs/v2/lib/WinSetRegion.htm
win . set_trans_color ( "White" ) # Makes all pixels of the chosen color invisible inside the specified window.
win . set_transparent ( 155 ) # Makes the specified window semi-transparent (or "Off" to turn off transparency)
win . always_on_top = 'On' # Make the window always on top
# or
win . set_always_on_top ( 'On' )
for window in ahk . list_windows (): # list all (non-hidden) windows -- ``detect_hidden_windows=True`` to include hidden
print ( window . title )
# Some more attributes
print ( window . text ) # window text -- or .get_text()
print ( window . get_position ()) # (x, y, width, height)
print ( window . id ) # the ahk_id of the window
print ( window . pid ) # process ID -- or .get_pid()
print ( window . process_path ) # or .get_process_path()
if win . active : # or win.is_active()
...
if win . exist : # or win.exists()
...
# Controls
edit_control = win . list_controls ()[ 0 ] # get the first control for the window, in this case "Edit1" for Notepad
edit_control . get_text () # get the text in Notepad
edit_control . get_position () # returns a `Postion` namedtuple: e.g. Position(x=6, y=49, width=2381, height=1013) Berbagai metode jendela juga dapat dipanggil secara langsung tanpa terlebih dahulu membuat objek Window dengan menggunakan metode win_* yang mendasarinya pada kelas AHK . Misalnya, alih -alih win.close() seperti di atas, orang bisa memanggil ahk.win_close(title='Untitled - Notepad') sebagai gantinya.
from ahk import AHK
ahk = AHK ()
ahk . image_search ( 'C: \ path \ to \ image.jpg' ) # Find an image on screen
# Find an image within a boundary on screen
ahk . image_search ( 'C: \ path \ to \ image.jpg' , upper_bound = ( 100 , 100 ), # upper-left corner of search area
lower_bound = ( 400 , 400 )) # lower-right corner of search area
ahk . pixel_get_color ( 100 , 100 ) # Get color of pixel located at coords (100, 100)
ahk . pixel_search ( color = '0x9d6346' , search_region_start = ( 0 , 0 ), search_region_end = ( 500 , 500 )) # Get coords of the first pixel with specified color Dapat/atur data Clipboard
from ahk import AHK
ahk = AHK ()
ahk . set_clipboard ( 'hello N{EARTH GLOBE AMERICAS} ' ) # set clipboard text contents
ahk . get_clipboard () # get clipboard text contents
# 'hello ?'
ahk . set_clipboard ( "" ) # Clear the clipboard
ahk . clip_wait ( timeout = 3 ) # Wait for clipboard contents to change (with text or file(s))
ahk . clip_wait ( timeout = 3 , wait_for_any_data = True ) # wait for _any_ clipboard contents Anda juga dapat mendapatkan/mengatur ClipboardAll - namun, Anda tidak boleh mencoba menelepon set_clipboard_all dengan data lain selain seperti yang dikembalikan oleh get_clipboard_all atau masalah yang tidak terduga dapat terjadi.
from ahk import AHK
ahk = AHK ()
# save all clipboard contents in all formats
saved_clipboard = ahk . get_clipboard_all ()
ahk . set_clipboard ( 'something else' )
...
ahk . set_clipboard_all ( saved_clipboard ) # restore saved content from earlier Anda juga dapat mengatur panggilan balik untuk dieksekusi saat konten clipboard berubah. Seperti halnya metode hotkey yang disebutkan di atas, Anda juga dapat mengatur penangan pengecualian. Seperti hotkeys, callback on_clipboard_change juga mengharuskan .start_hotkeys() dipanggil untuk berlaku.
Fungsi callback harus menerima satu argumen posisi, yang merupakan integer yang menunjukkan tipe data clipboard.
from ahk import AHK
ahk = AHK ()
def my_clipboard_callback ( change_type : int ):
if change_type == 0 :
print ( 'Clipboard is now empty' )
elif change_type == 1 :
print ( 'Clipboard has text contents' )
elif change_type == 2 :
print ( 'Clipboard has non-text contents' )
ahk . on_clipboard_change ( my_clipboard_callback )
ahk . start_hotkeys () # like with hotkeys, must be called at least once for listening to start
# ...
ahk . set_clipboard ( "hello" ) # will cause the message "Clipboard has text contents" to be printed by the callback
ahk . set_clipboard ( "" ) # Clears the clipboard, causing the message "Clipboard is now empty" to be printed by the callback from ahk import AHK
ahk = AHK ()
ahk . sound_play ( 'C: \ path \ to \ sound.wav' ) # Play an audio file
ahk . sound_beep ( frequency = 440 , duration = 1000 ) # Play a beep for 1 second (duration in microseconds)
ahk . get_volume ( device_number = 1 ) # Get volume of a device
ahk . set_volume ( 50 , device_number = 1 ) # Set volume of a device
ahk . sound_get ( device_number = 1 , component_type = 'MASTER' , control_type = 'VOLUME' ) # Get sound device property
ahk . sound_set ( 50 , device_number = 1 , component_type = 'MASTER' , control_type = 'VOLUME' ) # Set sound device property Tooltips/Traytips
import time
from ahk import AHK
ahk = AHK ()
ahk . show_tooltip ( "hello4" , x = 10 , y = 10 )
time . sleep ( 2 )
ahk . hide_tooltip () # hide the tooltip
ahk . show_info_traytip ( "Info" , "It's also info" , silent = False , blocking = True ) # Default info traytip
ahk . show_warning_traytip ( "Warning" , "It's a warning" ) # Warning traytip
ahk . show_error_traytip ( "Error" , "It's an error" ) # Error trytipKotak dialog
from ahk import AHK , MsgBoxButtons
ahk = AHK ()
ahk . msg_box ( text = 'Do you like message boxes?' , title = 'My Title' , buttons = MsgBoxButtons . YES_NO )
ahk . input_box ( prompt = 'Password' , title = 'Enter your password' , hide = True )
ahk . file_select_box ( title = 'Select one or more mp3 files' , multi = True , filter = '*.mp3' , file_must_exist = True )
ahk . folder_select_box ( prompt = 'Select a folder' ) Anda dapat mengubah berbagai negara global seperti CoordMode , DetectHiddenWindows , dll. Jadi Anda tidak perlu meneruskan parameter ini secara langsung ke panggilan fungsi
from ahk import AHK
ahk = AHK ()
ahk . set_coord_mode ( 'Mouse' , 'Screen' ) # set default Mouse CoordMode to be relative to Screen
ahk . set_detect_hidden_windows ( True ) # Turn on detect hidden windows by default
ahk . set_send_level ( 5 ) # Change send https://www.autohotkey.com/docs/v1/lib/SendLevel.htm
ahk . set_title_match_mode ( 'Slow' ) # change title match speed and/or mode
ahk . set_title_match_mode ( 'RegEx' )
ahk . set_title_match_mode (( 'RegEx' , 'Slow' )) # or both at the same time
ahk . set_send_mode ( 'Event' ) # change the default SendMode Anda dapat menambahkan arahan yang akan ditambahkan ke semua skrip yang dihasilkan. Misalnya, untuk mencegah trayicon AHK muncul, Anda dapat menambahkan arahan notrayicon.
from ahk import AHK
from ahk . directives import NoTrayIcon
ahk = AHK ( directives = [ NoTrayIcon ])Secara default, beberapa arahan ditambahkan secara otomatis untuk memastikan fungsionalitas dan digabungkan dengan arahan yang disediakan pengguna.
Arahan tidak diterapkan untuk proses AHK yang digunakan untuk menangani hotkey dan hotstring (dibahas di bawah) secara default. Untuk menerapkan arahan ke proses hotkeys menggunakan argumen kata kunci apply_to_hotkeys_process=True :
from ahk import AHK
from ahk . directives import NoTrayIcon
directives = [
NoTrayIcon ( apply_to_hotkeys_process = True )
]
ahk = AHK ( directives = directives )Seperti dibahas di atas, Anda dapat menyembunyikan ikon baki jika diinginkan. Selain itu, ada beberapa metode yang tersedia untuk menyesuaikan ikon baki.
from ahk import AHK
ahk = AHK ()
# change the tray icon (in this case, using a builtin system icon)
ahk . menu_tray_icon ( 'Shell32.dll' , 174 )
# revert it back to the original:
ahk . menu_tray_icon ()
# change the tooltip that shows up when hovering the mouse over the tray icon
ahk . menu_tray_tooltip ( 'My Program Name' )
# Hide the tray icon
ahk . menu_tray_icon_hide ()
# Show the tray icon that was previously hidden by ``NoTrayIcon`` or ``menu_tray_icon_hide``
ahk . menu_tray_icon_show ()Anda dapat membaca/menulis/menghapus kunci registri:
from ahk import AHK
ahk = AHK ()
ahk . reg_write ( 'REG_SZ' , r'HKEY_CURRENT_USERSOFTWAREmy-software' , value = 'test' )
ahk . reg_write ( 'REG_SZ' , r'HKEY_CURRENT_USERSOFTWAREmy-software' , value_name = 'foo' , value = 'bar' )
ahk . reg_read ( r'HKEY_CURRENT_USERSOFTWAREmy-software' ) # 'test'
ahk . reg_delete ( r'HKEY_CURRENT_USERSOFTWAREmy-software' )Jika kunci tidak ada atau masalah lain terjadi, pengecualian diangkat.
Sebagian besar metode di perpustakaan ini menyediakan antarmuka yang tidak memblokir, sehingga skrip Python Anda dapat terus mengeksekusi saat skrip AHK Anda berjalan.
Secara default, semua panggilan memblokir - setiap fungsi akan dieksekusi sepenuhnya sebelum fungsi berikutnya dijalankan.
Namun, kadang -kadang Anda mungkin ingin menjalankan kode lain sementara AHK menjalankan beberapa kode. Ketika argumen kata kunci blocking disuplai dengan False , panggilan fungsi akan segera kembali saat fungsi AHK dilakukan di latar belakang.
Sebagai contoh, Anda dapat memindahkan mouse perlahan dan melaporkan posisinya saat bergerak:
import time
from ahk import AHK
ahk = AHK ()
ahk . mouse_position = ( 200 , 200 ) # Moves the mouse instantly to the start position
start = time . time ()
# move the mouse very slowly
ahk . mouse_move ( x = 100 , y = 100 , speed = 30 , blocking = False )
# This code begins executing right away, even though the mouse is still moving
while True :
t = round ( time . time () - start , 4 )
position = ahk . mouse_position
print ( t , position ) # report mouse position while it moves
if position == ( 100 , 100 ):
break Saat Anda menentukan blocking=False Anda akan selalu menerima objek FutureResult khusus (atau Objek AsyncFutureResult di API Async, dibahas di bawah) yang memungkinkan Anda menunggu fungsi untuk menyelesaikan dan mengambil nilai pengembalian melalui fungsi get_result . Bahkan ketika suatu fungsi biasanya tidak mengembalikan None , ini dapat berguna untuk memastikan AHK telah selesai mengeksekusi fungsi.
Panggilan nonblocking:
set_coord_mode atau serupa) - ini dapat berubah dalam versi mendatang.FutureResult khusus (atau Objek AsyncFutureResult di API Async, yang dibahas di bawah) yang memungkinkan Anda menunggu fungsi untuk menyelesaikan dan mengambil nilai pengembalian melalui fungsi result . Bahkan ketika suatu fungsi biasanya tidak mengembalikan None , ini dapat berguna untuk memastikan AHK telah selesai mengeksekusi fungsi. from ahk import AHK
ahk = AHK ()
future_result = ahk . mouse_move ( 100 , 100 , speed = 40 , blocking = False )
...
# wait on the mouse_move to finish
future_result . result ( timeout = 10 ) # timeout keyword is optional API async disediakan sehingga fungsi dapat dipanggil menggunakan async / await . Semua metode yang sama dari API sinkron tersedia di API ASYNC.
from ahk import AsyncAHK
import asyncio
ahk = AsyncAHK ()
async def main ():
await ahk . mouse_move ( 100 , 100 )
x , y = await ahk . get_mouse_position ()
print ( x , y )
asyncio . run ( main ())API Async identik dengan API normal, dengan beberapa perbedaan penting:
.mouse_position atau .title untuk windows) dapat await , metode tambahan (seperti get_mouse_position() dan get_title() ) telah ditambahkan untuk API yang lebih intuitif dan direkomendasikan selama penggunaan properti.ahk.mouse_postion = (200, 200) ) tidak diizinkan dalam API async (runtimeError dinaikkan). Penetapan properti tetap tersedia di Sync API.AsyncFutureResult Objects (dikembalikan saat menentukan blocking=False ) bekerja sama dengan objek FutureResult di Sync API, kecuali kata kunci timeout tidak didukung untuk metode result ).Perhatikan juga bahwa:
AsyncAHK tidak akan berjalan bersamaan. Anda harus menggunakan blocking=False , seperti pada API sinkronisasi, atau menggunakan beberapa contoh AsyncAHK . Perpustakaan ini sepenuhnya diisi tipe, memungkinkan Anda untuk memanfaatkan alat seperti mypy untuk membantu memvalidasi jenis koreksi kode Anda. IDE yang mengimplementasikan fitur pengecer jenis juga dapat memanfaatkan petunjuk jenis untuk membantu memastikan kode Anda aman.
Anda juga dapat menjalankan kode autohotkey sewenang -wenang baik sebagai file skrip .ahk atau sebagai string yang berisi kode AHK.
from ahk import AHK
ahk = AHK ()
my_script = '''
MouseMove, 100, 100
; etc...
'''
ahk . run_script ( my_script ) from ahk import AHK
ahk = AHK ()
script_path = r'C:PathTomyscript.ahk'
ahk . run_script ( script_path ) Untuk menggunakan paket ini, Anda memerlukan Autohotkey Executable (misalnya, AutoHotkey.exe ). Diharapkan berada di jalur secara default atau di lokasi instalasi default ( C:Program FilesAutoHotkeyAutoHotkey.exe untuk V1 atau C:Program FilesAutoHotkeyv2AutoHotkey64.exe untuk V2)
Autohotkey V1 dan V2 keduanya didukung sepenuhnya, meskipun beberapa perbedaan perilaku akan terjadi tergantung pada versi mana yang Anda gunakan. Lihat catatan di bawah ini.
Cara yang disarankan untuk memasok biner autohotkey (untuk V1 dan V2) adalah dengan menginstal tambahan binary untuk paket ini. Ini akan memberikan executable yang diperlukan dan membantu memastikan mereka ditempatkan dengan benar di jalur.
pip install "ahk[binary]"
Atau, Anda dapat memberikan jalur dalam kode:
from ahk import AHK
ahk = AHK ( executable_path = 'C: \ path \ to \ AutoHotkey.exe' ) Anda juga dapat menggunakan variabel lingkungan AHK_PATH untuk menentukan lokasi yang dapat dieksekusi.
set AHK_PATH=C:PathToAutoHotkey.exe
python myscript.py Secara default, ketika tidak ada parameter executable_path (atau variabel lingkungan AHK_PATH ) diatur, hanya nama biner Autohotkey V1 yang dicari di jalur atau lokasi instalasi default. Perilaku ini dapat berubah dalam versi mendatang untuk memungkinkan V2 digunakan secara default.
Untuk menggunakan Autohotkey Version 2, Anda dapat melakukan salah satu hal berikut:
executable_path dengan lokasi biner autohotkey v2AHK_PATH dengan lokasi biner Autohotkey V2version dengan nilai v2 yang memungkinkan menemukan yang dapat dieksekusi menggunakan nama biner Autohotkey V2 dan lokasi instalasi default.Misalnya:
from ahk import AHK
ahk = AHK ( executable_path = r'C:Program FilesAutoHotkeyv2AutoHotkey64.exe' )
# OR
ahk = AHK ( version = 'v2' ) Ketika Anda memberikan argumen kata kunci version (dengan "v1" atau "v2" ) sebuah cek dilakukan untuk memastikan biner yang disediakan (atau ditemukan) cocok dengan versi yang diminta. Ketika kata kunci version dihilangkan, versi ditentukan secara otomatis dari biner yang dapat dieksekusi (atau ditemukan).
API proyek ini awalnya dirancang terhadap Autohotkey V1 dan tanda tangan fungsi adalah sama, bahkan ketika menggunakan Autohotkey V2. Sementara sebagian besar perilaku tetap sama, beberapa perilaku berubah saat menggunakan autohotkey v2 dibandingkan dengan V1. Ini sebagian besar disebabkan oleh perbedaan yang mendasari antara kedua versi tersebut.
Beberapa perbedaan penting yang mungkin Anda alami saat menggunakan Autohotkey V2 dengan perpustakaan ini meliputi:
None (seperti di Autohotkey V2, targeterror dilemparkan dalam kebanyakan kasus di mana jendela atau kontrol tidak dapat ditemukan)ControlSend ( ahk.control_send atau Window.send atau Control.send ) berbeda dalam autohotkey v2 ketika parameter control tidak ditentukan. Di V1, kunci dikirim ke kontrol paling atas, yang biasanya merupakan perilaku yang benar. Di V2, kunci dikirim langsung ke jendela. Ini berarti dalam banyak kasus, Anda perlu menentukan kontrol secara eksplisit saat menggunakan V2.secondstowait untuk TrayTip ( ahk.show_traytip ) dihapus dalam V2. Menentukan parameter ini dalam pembungkus Python akan menyebabkan peringatan dipancarkan dan parameter diabaikan.Input daripada Event di V1 (sebagai akibatnya, misalnya, parameter kecepatan mouse ke mouse_move dan mouse_drag akan diabaikan di V2 kecuali jika mode pengiriman diubah)2 di Autohotkey V2. Ini 1 di Autohotkey V1. Gunakan argumen kata kunci title_match_mode ke win_get dan metode lain yang menerima kata kunci ini untuk mengontrol perilaku ini atau menggunakan set_title_match_mode untuk mengubah perilaku default (panggilan non-blocking dijalankan dalam proses terpisah dan tidak terpengaruh oleh set_title_match_mode ) Anda dapat mengembangkan ekstensi untuk memperluas fungsionalitas ahk - yaitu: Menulis kode autohotkey Anda sendiri dan menambahkan metode tambahan ke kelas AHK. Lihat dokumen yang diperluas untuk informasi lebih lanjut.
Semua kontribusi disambut dan dihargai.
Silakan membuka masalah GitHub atau PR untuk umpan balik, ide, permintaan fitur atau pertanyaan.
Ini adalah beberapa proyek serupa yang biasa digunakan untuk otomatisasi dengan Python.
keyboard , kontrol mouse ular python murni!