按键精灵脚本代码大全 |
您所在的位置:网站首页 › 触摸精灵脚本代码 › 按键精灵脚本代码大全 |
基本命令(一):触摸命令 //按键命令KeyPress "1" //按键KeyDown "1" //按下不松手KeyUp "1" //松开弹起//短暂点击坐标(100,200)Tap 100,200 //短暂点击坐标(100,200)//长按1000毫秒Touch 0, 0, 1000 //长按1000毫秒//滑动Swipe 100,200,300,400 (二):控制命令//循环50遍For 50 //循环50遍 //循环体Next//判断If 1+3>6 Then //为真执行这里End If//子程序,相当于一个函数Sub miniProject() //子程序开始 //子程序内容End Sub //子程序结束//调用子程序Call miniProject() (三):颜色命令Dim intX, intY FindColor 0, 0, 0, 0, "0000FF", 0, 0.90, intX, intY If intX > -1 And intY > -1 Then //在定义的范围内找到颜色值则执行这里的代码End If (四):图形命令//找图命令Dim intX, intY FindPic 0, 0, 0, 0, "Attachment:闯关.png", "000000", 0, 0.9, intX, intY If intX > -1 And intY > -1 Then //如果找到了怎么处理,点一下Tap intX,intY End If (五):设备命令//获取屏幕宽Dim screenX screenX = GetScreenX()//获取屏幕高Dim screenY screenY = GetScreenY()//获取屏幕色彩Dim colorDep colorDep = GetScreenColorDep() (六):其他命令//输入文本InputText "666"//输出调试信息TracePrint "666"//toastShowMessage "666 //延时 Delay 1000 //启动app RunApp "com.tencent.tmgp.sgame" 抓抓工具上面有好多东西:比如截图,多点比色,区域找图//多点比色If CmpColorEx("529|1209|100A03,396|1425|0B0706",0.9) = 1 Then TracePrint 1Else TracePrint 0End If 作者:卡卡大神链接:https://www.jianshu.com/p/10968fa75a43来源:简书著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |