;发送.ahk,用于数字信息,可以用其他编程语言 SetTitleMatchMode, 2 DetectHiddenWindows, on !S:: PostMessage, 0x500, 0,0,, 接受.ahk Sleep 3000 PostMessage, 0x500, 0x100,0,, 接受.ahk ;停 Sleep 3000 PostMessage, 0x500, 0x100,0x50,, 接受.ahk Sleep 3000 PostMessage, 0x500, 0x100,0x100,, 接受.ahk ;开 Sleep 5000 SendMessage, 0x600, 0x200,0x100,, 接受.ahk ;退 MsgBox 返回 %ErrorLevel% ;返回666 return ;接收.ahk SetFormat,IntegerFast,H OnMessage(0x500,"消息") OnMessage(0x600,"消息") 消息(w ,l ,号){ TrayTip ,"有消息了",% "消息号: " 号 " w: " w " l: " l,1 if (号=0x500 && w=0x100) if l=0 Suspend On else if l=0x100 Suspend Off if (号=0x600) return 666 }
多谢分享,正想学习onmessage
对你有帮助就好!