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
    

      

  • 相关阅读:
    [转]读取并修改App.config文件
    [转]线程和进程的概念
    实习日志(3)
    实习日志2
    实习小感,回学校啦~~~~
    请教LUA高手一段代码,希望帮忙谢谢!
    实习的日子
    vs显示 error LNK2019: 无法解析的外部符号 _main解决办法
    创建一个新窗口进程并返回进程ID号和进程的主线程ID号
    显示基本图形界面第一天
  • 原文地址:https://www.cnblogs.com/xiaoliao/p/12003217.html
Copyright © 2011-2022 走看看