今天和一个朋友开完笑说让我进他的电脑,从而出现这篇文章!!!!
目前的QQ版本支持远程协助,所以想到通过两个QQ号码完成对另一台电脑的控制
第一台电脑:
1.自动登录QQ
2.打开另一个QQ号码窗口
3.循环判断"文字图形命令"(比如启动)
4.清屏防止同一命令反复执行
5.根据命令选择对应功能按钮点,单击启动对应功能
第二台电脑
给第一台电脑的QQ号发文字命令
注意事项,两个QQ最好采用同一版本,注意发送和截取文字命令的字体和大小,保证图形文字命令被识别
程序没什么难点写着玩的,在家控制单位电脑,
xxxx.bmp //用户QQ中的名字或者头像图形
qidong.bmp //启动命令文字比如宋体9号的"启动",将文字截图
yuancheng.bmp //远程协助图标截图
stop.bmp //启动命令文字比如宋体9号的"停止",将文字截图
代码如下:
UserVar Hao=xxxxxxxx "输入账号"
UserVar Ma="xxxxxxxx" "输入密码"
UserVar Lj="C:\Program Files\Tencent" "QQ所在路径"
RunApp Lj & "\Bin\QQ.exe"
Delay 2000
Hwnd = Plugin.Window.Find(0, "QQ2012")
Call Plugin.Window.Move(Hwnd, 0, 0)
Call Plugin.Window.Active(Hwnd)
Delay 500
MoveTo 123, 153
Delay 222
LeftClick 1
Delay 222
SayString Hao
Delay 400
KeyPressS "Tab", 1
Delay 444
a=1
For len(Ma)
key=Asc(UCase(Mid(ma,a,1)))
KeyPressS key,1
Delay 10
a=a+1
EndFor
Delay 444
KeyPress "Enter", 1
Delay 500
Call Plugin.Msg.Tips("自动登录完毕!")
//打开用户
Delay 5000
Hwnd = Plugin.Window.Find(0, "QQ2012")
Call Plugin.Window.Move(Hwnd, 0, 0)
Call Plugin.Window.Active(Hwnd)
FindPic 0,0,800,600,"Attachment:\xxxx.bmp",0.9,intX,intY
If intX > 0 and intY > 0 Then
MoveTo intX,intY
LeftDoubleClick 1
Call Plugin.Window.Hide
Delay 3000
Hwnd_1 = Plugin.Window.Find(0, "xxxx")
Call Plugin.Window.Move(Hwnd_1,887 , 0)
Call Plugin.Window.Active(Hwnd_1)
Call SayQQ("连接成功")
i = 1
While i > 0
intX = 0
intY = 0
intX_1 = 0
intY_1 = 0
//启动远程协助
FindPic 887, 0, 1440, 520, "Attachment:\qidong.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
FindPic 887, 0, 1440, 520, "Attachment:\yuancheng.bmp", 0.8, intX_1, intY_1
If intX_1 > 0 and intY_1 > 0 Then
Call Plugin.Msg.Tips("远程协助启动!")
MoveTo intX_1, intY_1
Delay 100
LeftClick 1
Delay 500
Call ClearScreen(intX,intY)
End If
End If
intX = 0
intY = 0
//启动摄像头
FindPic 887, 0, 1440, 520, "Attachment:\sxtstart.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
FindPic 887, 0, 1440, 520, "Attachment:\sxt.bmp", 0.8, intX_1, intY_1
If intX_1 > 0 and intY_1 > 0 Then
Call Plugin.Msg.Tips("摄像头启动!")
MoveTo intX_1, intY_1
Delay 100
LeftClick 1
Delay 500
Call ClearScreen(intX, intY)
End If
End If
intX = 0
intY = 0
//停止远程协助
FindPic 887, 0, 1440, 520, "Attachment:\stop.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
i = 0
Call SayQQ("连接终止")
Call Plugin.Msg.Tips("远程协助终止!")
Call ClearScreen(intX,intY)
End If
Delay 1000
Wend
End If
Sub ClearScreen(xx,yy)
//清屏
MoveTo xx,yy
RightClick 1
Delay 100
FindPic 887, 0, 1440, 520, "Attachment:\cls.bmp", 0.9, intX, intY
If intX > 0 and intY > 0 Then
MoveTo intX, intY
LeftClick 1
Delay 500
End If
End Sub
Sub SayQQ(say)
Delay 500
SayString say
KeyDown 18, 1
KeyPress 83, 1
KeyUp 18, 1
Delay 500
End Sub
第一台电脑:
1.自动登录QQ
2.打开另一个QQ号码窗口
3.循环判断"文字图形命令"(比如启动)
4.清屏防止同一命令反复执行
5.根据命令选择对应功能按钮点,单击启动对应功能
第二台电脑
给第一台电脑的QQ号发文字命令
注意事项,两个QQ最好采用同一版本,注意发送和截取文字命令的字体和大小,保证图形文字命令被识别
程序没什么难点写着玩的,在家控制单位电脑,
xxxx.bmp //用户QQ中的名字或者头像图形
qidong.bmp //启动命令文字比如宋体9号的"启动",将文字截图
yuancheng.bmp //远程协助图标截图
stop.bmp //启动命令文字比如宋体9号的"停止",将文字截图
代码如下:
UserVar Hao=xxxxxxxx "输入账号"
UserVar Ma="xxxxxxxx" "输入密码"
UserVar Lj="C:\Program Files\Tencent" "QQ所在路径"
RunApp Lj & "\Bin\QQ.exe"
Delay 2000
Hwnd = Plugin.Window.Find(0, "QQ2012")
Call Plugin.Window.Move(Hwnd, 0, 0)
Call Plugin.Window.Active(Hwnd)
Delay 500
MoveTo 123, 153
Delay 222
LeftClick 1
Delay 222
SayString Hao
Delay 400
KeyPressS "Tab", 1
Delay 444
a=1
For len(Ma)
key=Asc(UCase(Mid(ma,a,1)))
KeyPressS key,1
Delay 10
a=a+1
EndFor
Delay 444
KeyPress "Enter", 1
Delay 500
Call Plugin.Msg.Tips("自动登录完毕!")
//打开用户
Delay 5000
Hwnd = Plugin.Window.Find(0, "QQ2012")
Call Plugin.Window.Move(Hwnd, 0, 0)
Call Plugin.Window.Active(Hwnd)
FindPic 0,0,800,600,"Attachment:\xxxx.bmp",0.9,intX,intY
If intX > 0 and intY > 0 Then
MoveTo intX,intY
LeftDoubleClick 1
Call Plugin.Window.Hide
Delay 3000
Hwnd_1 = Plugin.Window.Find(0, "xxxx")
Call Plugin.Window.Move(Hwnd_1,887 , 0)
Call Plugin.Window.Active(Hwnd_1)
Call SayQQ("连接成功")
i = 1
While i > 0
intX = 0
intY = 0
intX_1 = 0
intY_1 = 0
//启动远程协助
FindPic 887, 0, 1440, 520, "Attachment:\qidong.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
FindPic 887, 0, 1440, 520, "Attachment:\yuancheng.bmp", 0.8, intX_1, intY_1
If intX_1 > 0 and intY_1 > 0 Then
Call Plugin.Msg.Tips("远程协助启动!")
MoveTo intX_1, intY_1
Delay 100
LeftClick 1
Delay 500
Call ClearScreen(intX,intY)
End If
End If
intX = 0
intY = 0
//启动摄像头
FindPic 887, 0, 1440, 520, "Attachment:\sxtstart.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
FindPic 887, 0, 1440, 520, "Attachment:\sxt.bmp", 0.8, intX_1, intY_1
If intX_1 > 0 and intY_1 > 0 Then
Call Plugin.Msg.Tips("摄像头启动!")
MoveTo intX_1, intY_1
Delay 100
LeftClick 1
Delay 500
Call ClearScreen(intX, intY)
End If
End If
intX = 0
intY = 0
//停止远程协助
FindPic 887, 0, 1440, 520, "Attachment:\stop.bmp", 0.8, intX, intY
If intX > 0 and intY > 0 Then
i = 0
Call SayQQ("连接终止")
Call Plugin.Msg.Tips("远程协助终止!")
Call ClearScreen(intX,intY)
End If
Delay 1000
Wend
End If
Sub ClearScreen(xx,yy)
//清屏
MoveTo xx,yy
RightClick 1
Delay 100
FindPic 887, 0, 1440, 520, "Attachment:\cls.bmp", 0.9, intX, intY
If intX > 0 and intY > 0 Then
MoveTo intX, intY
LeftClick 1
Delay 500
End If
End Sub
Sub SayQQ(say)
Delay 500
SayString say
KeyDown 18, 1
KeyPress 83, 1
KeyUp 18, 1
Delay 500
End Sub