2019-04-24 delphi 自动填入验证码

procedure TForm1.Button2Click(Sender: TObject);

begin

        if  strtoint(edit1.text)=5  then

    begin

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,4,1)),SW_HIDE);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit6.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit6.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit6.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit6.text,4,1)),SW_HIDE);

    end;

      if  strtoint(edit1.text)=4  then

    begin

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 4 --key call.input --value '+copy(edit5.text,4,1)),SW_HIDE);

    end;

      if  strtoint(edit1.text)=3  then

    begin

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 3 --key call.input --value '+copy(edit4.text,4,1)),SW_HIDE);

      end;


      if  strtoint(edit1.text)=2  then

    begin

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,4,1)),SW_HIDE);

          WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 2 --key call.input --value '+copy(edit3.text,4,1)),SW_HIDE);

      end;

    if  strtoint(edit1.text)=2  then

    begin

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,1,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,2,1)),SW_HIDE);

        sleep(500);

      WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,3,1)),SW_HIDE);

        sleep(500);

        WinExec(PChar( 'cmd.exe ' + '/c '+'dnconsole.exe  action --index 1 --key call.input --value '+copy(edit2.text,4,1)),SW_HIDE);

    end;

end;

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容