$ account XgHao
This repository provides an AutoHotkey v2 script that automates the export of WeChat contacts to a CSV file by simulating keyboard and mouse interactions with the WeChat desktop client. The script is designed for WeChat 3.x versions and may not work with newer 4.x versions due to UI changes. The architecture is a single monolithic script with functions for window management, user input, contact detail extraction, and CSV file generation. The main workflow is triggered by the Win+C hotkey, which prompts the user for the number of contacts and the delay between each contact extraction, then iterates through the contact list to copy and save each contact's details. While the script is tightly coupled to the WeChat UI, it contains several reusable utility functions: GetContactCount and GetContactDuration for validating numeric user input, and FormatCsvItem for sanitizing CSV output to prevent formula injection. These functions are isolated and can be extracted for use in other AutoHotkey projects. However, the core automation logic is specific to WeChat and requires the legacy 3.x client to function correctly.