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
    

      

  • 相关阅读:
    Mybatis中Log4j日志的使用
    Mybatis结果集ResultMap映射
    Mybatis中的基本对象的生命周期和作用域
    IAR瑞萨单片机开发加入printf调试函数
    【转】C语言mem.h中的函数介绍
    【转】c语言位域操作—_结构体内冒号:的使用
    串口数据传输当中的共用体和结构体转换
    【转】printf格式串中的%f的输出格式和内容
    【转】缓冲区设计--环形队列(C++)
    【转】环形队列理论(C语言)
  • 原文地址:https://www.cnblogs.com/xiaoliao/p/12003217.html
Copyright © 2011-2022 走看看