《按键精灵9得到鼠指向的窗口句柄.docx》由会员分享,可在线阅读,更多相关《按键精灵9得到鼠指向的窗口句柄.docx(3页珍藏版)》请在三一办公上搜索。
1、按键精灵9 得到鼠指向的窗口句柄/得到鼠标指向的窗口句柄 Hwnd = Plugin.Window.MousePoint /得到窗口句柄的客户区大小 sRect = Plugin.Window.GetClientRect(Hwnd) Dim MyArray MyArray=Split(sRect,|) Ux=MyArray(0) Uy=MyArray(1) MoveTo ux,uy /MessageBox 游戏窗口左上角的坐标:&Vbcrlf&Ux&,&Uy&Vbcrlf&句柄是:&Hwnd &是字符串连接符, Vbcrlf是换行符 /坐标定位 Hx=Ux+756 /好友菜单 Hy=Uy+27
2、7 Hx1=Ux+640 /第一位好友 Hy1=Uy+170 Jlx=Ux+380 /确定获得奖励 Jly=Uy+395 Scx1=Ux+483 /与他赛车 Scy1=Uy+577 Scx2=Ux+315 /赛一场 Scy2=Uy+503 Gtx=Ux+55 /快速过图 Gty=Uy+481 Cjx=Ux+380 /去抽奖 Cjy=Uy+422 Cjx1=Ux+272 /抽奖一 Cjy1=Uy+467 Cjqx=Ux+313 /抽奖确认 Cjqy=Uy+348 Cjjsx=Ux+377 /抽奖结束 Cjjsy=Uy+547 =传说中的分割线= =打开好友菜单 For 8 MoveTo hx,
3、hy Delay 500 MoveTo hx1, hy1 Delay 40 LeftClick 1 Delay 400 =单击 获得奖励 MoveTo JLx, JLy Delay 5000 LeftClick 1 Delay 400 =单击 与他比赛 MoveTo Scx1, Scy1 Delay 400 LeftClick 1 Delay 400 =单击赛一场,开始比赛 MoveTo Scx2, Scy2 Delay 400 LeftClick 1 Delay 400 =快速跳过比赛 MoveTo Gtx, Gty Delay 1000 LeftClick 1 Delay 400 =单击
4、开始抽奖 MoveTo Cjx, Cjy Delay 3000 LeftClick 1 Delay 400 MoveTo Cjx1, Cjy1 Delay 200 LeftClick 1 Delay 400 For 2 Cjx1= Cjx1+110 MoveTo Cjx1, Cjy1 Delay 200 LeftClick 1 Delay 400 MoveTo Cjqx, Cjqy Delay 200 LeftClick 1 Delay 400 Next =比赛结束单击确定 For 2 MoveTo 711, 740 Delay 400 LeftClick 1 Delay 400 Next N
5、ext =以下是按键精灵录制的内容= =开始执行比赛 Delay 7 MoveTo 699, 614 Delay 100 LeftClick 1 Delay 400 =赛一场选择 Delay 7 MoveTo 319, 533 Delay 1000 LeftClick 1 Delay 400 GetColor=GetPixelColor(22,279) While GetColor = 000000 MoveTo 740, 319 Delay 100 LeftClick 1 Delay 10 GetColor=GetPixelColor(22,279) Wend GetColor=GetPix
6、elColor(22,249) While GetColor = 000000 MoveTo 741, 390 Delay 100 LeftClick 1 Delay 10 GetColor=GetPixelColor(22,249) Wend GetColor=GetPixelColor(22,230) While GetColor = 000000 MoveTo 742, 461 Delay 100 LeftClick 1 Delay 10 GetColor=GetPixelColor(22,230) Wend =跳过动画 Delay 7 MoveTo 64, 511 Delay 1000 LeftClick 1 Delay 400 =确定输赢 Delay 7 MoveTo 388, 451 Delay 2500 LeftClick 1 Delay 400