方便登录,写的小工具
1 import win.ui; 2 import web.ui; 3 /*DSG{{*/ 4 var winform = ..win.form(text="AAuto Form";right=599;bottom=399) 5 winform.add( 6 button={cls="button";text="百度";left=41;top=25;right=163;bottom=59;z=1}; 7 button2={cls="button";text="360云";left=200;top=24;right=322;bottom=58;z=2}; 8 custom={cls="custom";text="custom";left=25;top=76;right=569;bottom=261;autosize=1;center=1;edge=1;transparent=1;z=3}; 9 edit={cls="edit";text="edit";left=2;top=308;right=597;bottom=400;edge=1;multiline=1;z=4} 10 ) 11 /*}}*/ 12 13 14 var wb = web.form( winform.custom ) 15 winform.button2.oncommand = function(id,event){ 16 url = "http://yunpan.360.cn/" 17 wb.go(url) 18 winform.edit.appendText( / 19 wb.wait() 20 var user = wb.getEle("account") 21 user.value="username" 22 var pwd = wb.getEle("password") 23 pwd.value="pwd" 24 var ele = wb.queryEles(tagName="INPUT";className="quc-submit quc-button quc-button-sign-in" ); 25 ele.click() 26 wb.wait() 27 } 28 url = "https://passport.baidu.com/v2/?login&tpl=pcs&u=http%3A//www.baidu.com/p/sys/redirect%3Furl%3Dyourusername" 29 winform.button.oncommand = function(id,event){ 30 wb.noScriptErr=true; 31 js = /*window.alert = function(){ 32 return false; 33 } 34 */ 35 wb.go(url) 36 wb.wait() 37 var user = wb.getEle("TANGRAM__PSP_3__userName") 38 user.value = "username" 39 var pwd = wb.getEle("TANGRAM__PSP_3__password") 40 pwd.value = "pwd" 41 wb.getEle("TANGRAM__PSP_3__submit").click() 42 wb.doScript(js) 43 } 44 45 46 winform.show() 47 win.loopMessage();