马上加入TC
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
源码如下:
我就是想只用一个功能方法让他返回账号和密码2个文本
- namespace gmail
- var Meter=0
- var accnumber,Passwd
- function getaccnumber(number)
- EachLine=array[]
- SpecificContent=array[]
- Rtc=file.readfileex("d://zhh.txt") //读取账号路径
- if(Rtc!="") // 内容不等于空白 才执行
- var linenumber
- str.split(Rtc,"\r\n",EachLine) // \r\n是换行符
- arraysp.size(EachLine,linenumber)
- if(EachLine[linenumber-1]=="") //避免最后一行出现空串 也写入内容
- linenumber=linenumber-1
- endif
- endif
- existence=file.exist("d://zhh1.txt")
- if(existence)
- help.sleep(500)
- else
- filehwnd=file.createfile("d://zhh1.txt","rw")
- endif
- for(i=Meter;i<=Meter;i++) //遍历账号文件
- var linenumber
- str.split(EachLine[i],",",SpecificContent)
- arraysp.size(SpecificContent,linenumber)
- for(j=0;j<1;j++)
- number=SpecificContent[j]
- PasswdID=SpecificContent[j+1]
- endfor
- endfor
- return (number)
- endfunction
- function getPasswd(PasswdID)
- EachLine=array[]
- SpecificContent=array[]
- Rtc=file.readfileex("d://zhh.txt") //读取账号路径
- if(Rtc!="") // 内容不等于空白 才执行
- var linenumber
- str.split(Rtc,"\r\n",EachLine) // \r\n是换行符
- arraysp.size(EachLine,linenumber)
- if(EachLine[linenumber-1]=="") //避免最后一行出现空串 也写入内容
- linenumber=linenumber-1
- endif
- endif
- existence=file.exist("d://zhh1.txt")
- if(existence)
- help.sleep(500)
- else
- filehwnd=file.createfile("d://zhh1.txt","rw")
- endif
- for(i=Meter;i<=Meter;i++) //遍历账号文件
- var linenumber
- str.split(EachLine[i],",",SpecificContent)
- arraysp.size(SpecificContent,linenumber)
- for(j=0;j<1;j++)
- number=SpecificContent[j]
- PasswdID=SpecificContent[j+1]
- endfor
- endfor
- return (PasswdID)
- endfunction
- function 当前()
- //这里添加你要执行的代码
- edit.settext("edit0",gmail.getaccnumber(""))
- edit.settext("edit2",gmail.getPasswd(""))
- endfunction
- function 退出()
- web.go("explorer0","https://mail.google.com/mail/u/0/?logout&hl=zh-CN&hlor")
- endfunction
- function go()
- web.go("explorer0","gmail.com")
- help.sleep(help.randto(100,150))
- web.htmlinput("explorer0",gmail.getaccnumber(accnumber),"name:Email")
- help.sleep(help.randto(100,200))
- web.htmlinput("explorer0",gmail.getPasswd(Passwd),"name:Passwd")
- help.sleep(500)
- web.htmlclick("explorer0","class:g-button g-button-submit")
- help.sleep(500)
- Meter=Meter+1
- endfunction
- function 改密码()
- web.go("explorer0","https://accounts.google.com/EditPasswd?hl=zh-CN")
- help.sleep(1100)
- web.htmlinput("explorer0",gmail.getPasswd(Passwd),"name:OldPasswd")
- help.sleep(400)
- web.htmlinput("explorer0","shangye2013","name:Passwd")
- help.sleep(400)
- web.htmlinput("explorer0","shangye2013","name:PasswdAgain")
- help.sleep(400)
- web.htmlclick("explorer0","save")
- endfunction
- function 改外发邮箱()
- web.go("explorer0","https://mail.google.com/mail/?hl=zh-cn&shva=1#settings/accounts")
- endfunction
- function button2_click()
- threadhwnd=thread.beginthread("gmail.改密码","")
- endfunction
- function button1_click()
- threadhwnd=thread.beginthread("gmail.改外发邮箱","")
- endfunction
- function button3_click()
- threadhwnd=thread.beginthread("gmail.退出","")
- endfunction
- function start_click()
- threadhwnd=thread.beginthread("gmail.go","")
- threadhwnd=thread.beginthread("gmail.当前","")
- endfunction
- function exit_click()
- help.exit()
- endfunction
- function init()
- threadhwnd=thread.beginthread("gmail.当前","")
- web.cleartemp()
- help.sleep(help.randto(200,500))
- web.clearcookie()
- help.sleep(help.randto(200,500))
- web.go("explorer0","gmail.com")
- help.sleep(help.randto(200,500))
- endfunction
- endnamespace
复制代码
|