zoukankan      html  css  js  c++  java
  • 按键过滑块验证

    //做滑块验证码处理
       If judgeDisplayVerifyCode = 1 Then 
     
        Do
        	
          FindPic 0, 0, 0, 0, "Attachment:newQQVerifycodePiece.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
        Delay 1000
         
            Rem 重复
            
               moveBriceXBeginPoint = intX 
               moveBriceYBeginPoint = intY + shanhai.RndEx(1, 20)
               TouchDown moveBriceXBeginPoint ,moveBriceYBeginPoint, 1
               剩下的需要移动的宽度 = 415 - moveBriceXBeginPoint
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.2, moveBriceYBeginPoint+1, 1, 2
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.3, moveBriceYBeginPoint+1, 1, 1
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.5, moveBriceYBeginPoint+1, 1, 3
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*1, moveBriceYBeginPoint+1, 1,6
               Delay 500
               TouchUp 1
           
       
       
       //验证码是否成功 
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
        验证码是否成功 = 1
         End If
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess2.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
         验证码是否成功 = 1
        End If
               
               
               If 验证码是否成功 = 0 Then 
               Delay 3000
               TouchDown moveBriceXBeginPoint ,moveBriceYBeginPoint, 1
               剩下的需要移动的宽度 = 399 - moveBriceXBeginPoint
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.2, moveBriceYBeginPoint+1, 1, 1
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.3, moveBriceYBeginPoint+1, 1, 2
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.5, moveBriceYBeginPoint+1, 1, 3
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*1, moveBriceYBeginPoint+1, 1,5
                Delay 500
                TouchUp  1
                 End If
                
       
         //验证码是否成功 
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
        验证码是否成功 = 1
        End If
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess2.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
        验证码是否成功 = 1
        End If       
                
               If 验证码是否成功 = 0 Then 
                 Delay 3000
               TouchDown moveBriceXBeginPoint ,moveBriceYBeginPoint, 1
               剩下的需要移动的宽度 = 383 - moveBriceXBeginPoint
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.2, moveBriceYBeginPoint+1, 1, 2
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.3, moveBriceYBeginPoint+1, 1, 1
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.5, moveBriceYBeginPoint+1, 1, 3
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*1, moveBriceYBeginPoint+1, 1,6
                Delay 500
                TouchUp  1
                End If
                
                
       //验证码是否成功 
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
        验证码是否成功 = 1
         End If
      
        FindPic 0, 0, 0, 0, "Attachment:newLoginSuccess2.png", "000000", 0, 0.9, intX, intY
        If intX > -1 And intY > -1 Then 
         验证码是否成功 = 1
         End If
                
                
                If 验证码是否成功 = 0 Then 
               Delay 3000
               TouchDown moveBriceXBeginPoint ,moveBriceYBeginPoint, 1
               剩下的需要移动的宽度 = 367 - moveBriceXBeginPoint
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.2, moveBriceYBeginPoint+1, 1, 2
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.3, moveBriceYBeginPoint+1, 1, 1
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*0.5, moveBriceYBeginPoint+1, 1, 3
               TouchMove moveBriceXBeginPoint+剩下的需要移动的宽度*1, moveBriceYBeginPoint+1, 1,6
                Delay 500
                TouchUp 1
                 End If
                
                
                
                
                
                If 验证码是否成功 = 0 Then 
                Delay 3000
                  //这里还要检查一下是否在登录界面弹出了登录失败,如果是还要点击确定才会返回
                  //这里要检查有没那图片弹出,有就点击那按钮,然后回到最开始去
                 // Goto  登录按钮处重复
                
                
                	 Goto 重复
                End If
                
                 
                
              Exit Do
        	
        	End If
         Loop
         
       End If
    

      

  • 相关阅读:
    Arrays.asList的使用
    php之sql语句 创建数据库、表、插入字段,自动判断是否成功
    初识 canvas 绘图
    自定义音频audio播放器
    我的晨练
    js获取屏幕或可视范围
    js 查看脚本运行时间的办法
    a:hover伪类在ios移动端浏览器内触发无法取消
    js模拟用户触摸事件
    持续健身带来的变化
  • 原文地址:https://www.cnblogs.com/xiaoliao/p/12003217.html
Copyright © 2011-2022 走看看