function main() var prefix,suffix,num,tmp,error,handle suffix=str.right(edit.gettext("username"),8) prefix=str.left(edit.gettext("username"),str.strleng(edit.gettext("username"))-8) num=type.cint(suffix) if(browse.gettext("logo")!=""&&radio.getstate("open")==true) handle=file.openfile(browse.gettext("logo"),"rw|FILE_SHARE_READ|FILE_SHARE_WRITE|OPEN_EXISTING|OPEN_ALWAYS") endif for(tmp=num;tmp<100000000;tmp++) suffix=type.cstring(tmp) edit.settext("username",prefix&suffix) //help.cmd("rasdial"&" "&edit.gettext("pppoe")&" "&edit.gettext("username")&" "&edit.gettext("password"),false) error=net.dialing(edit.gettext("pppoe"),prefix&suffix,edit.gettext("password")) help.sleep(type.cint(edit.gettext("overtime"))) if(error==0&&radio.getstate("open")==true) file.writefileend(handle,"") file.writefileline(handle,"") file.writefileend(handle,datetime.now()&" "&"账号:"&prefix&suffix&" "&"密码:"&edit.gettext("password")) endif if(error==0&&radio.getstate("close")==true) help.messagebox("账号:"&edit.gettext("username")&"\r"&"密码:"&edit.gettext("password"),"成功") button.settext("start","开始") return 0 endif net.disconnect(edit.gettext("pppoe")) endfor endfunction 代码如上,用help.cmd () rasdial 就行。。。是我使用不对吗? |
欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) | Powered by Discuz! X3.1 |