/* AHK v2 by king Edit 双击事件 */ global Edit1 WM_LBUTTONDBLCLk:=0x0203 ;https://msdn.microsoft.com/en-us/library/windows/desktop/ms645606(v=vs.85).aspx Gui := GuiCreate(, "Example Window") Gui.SetFont(,"微软雅黑") Gui.Add("Text",, "软件测试") Edit1:=Gui.Add("Edit", "w200") OnMessage(WM_LBUTTONDBLCLk, "DoubleClick") ;双击Edit1自动输入值 Gui.Show() ;msg WM_LBUTTONDBLCLk=0x0203 ;hwnd 控件句柄 DoubleClick(wParam, lParam, msg, hwnd) { if(Edit1.Hwnd<>hwnd) Return Edit1.Value :="http://www.qq.com" }