模拟复制得到QQ聊天记录的最后一条信息
call("main","")Func main($xx)
Local $hand,$win,$txt
if WinExists($xx) Then
$hwnd=WinGetHandle($xx)
WinSetState($hwnd,"",@SW_RESTORE)
WinActivate($hwnd)
send("!h")
Sleep(1000)
$win=WinGetPos($hwnd)
$xy=MouseGetPos()
MouseClick("",$win+$win-200,$win+$win-160)
send("^a")
send("^c")
$txt=clipget()
MouseMove($xy,$xy)
send("!h")
Call("getmsg",$txt)
EndIf
EndFunc
func getmsg($msg)
$zzxx=StringRegExp($msg,".*? ..../..?/..? ..?:..?:..?",3)
$zz=$zzxx
$zb=StringInStr($msg,$zz,0,-1)
$hfwb=StringMid($msg,$zb)
FileWriteLine("getmsg.txt",$hfwb)
EndFunc
页:
[1]