songveden Posted June 14, 2008 Share Posted June 14, 2008 #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> $ID="" $Pas="" Local $oIEYM = _IECreate ("ymsgr:sendim?youname&m=Some+Bug+For+You",0) WinSetState("Yahoo! Messenges", "", @SW_SHOW) If WinActive("Yahoo! Messenge") Then MsgBox(0, "", "Yahoo! Messenge") EndIf ControlClick("Yahoo! Messenges", "", "211","","",40,167) how to send $ID and $Pas to ControlClick("Yahoo! Messenges", "", "211","","",40,167) i stuck in here any body can help me to phinis my beta progame? sorry for my bad English hope to see you soon Demo see belowLogin_beta_souce.au3 Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> $ID="" $Pas="" Local $oIEYM = _IECreate ("ymsgr:sendim?youname&m=Some+Bug+For+You",0) WinSetState("Yahoo! Messenges", "", @SW_SHOW) If WinActive("Yahoo! Messenge") Then MsgBox(0, "", "Yahoo! Messenge") EndIf ControlClick("Yahoo! Messenges", "", "211","","",40,167) how to send $ID and $Pas to ControlClick("Yahoo! Messenges", "", "211","","",40,167) i stuck in here any body can help me to phinis my beta progame? sorry for my bad English hope to see you soon Demo see belowIf your ControlClick clicks in the control where you need to type in the ID then just use Send($ID) after th eControlClick. Then ControlClick the control where the password has to be entered and Send($Pas). But if you know the control IDs then instead of using ControlClick and Send, use ControlSend. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
songveden Posted June 14, 2008 Author Share Posted June 14, 2008 no no it didnt work ex: $ID="1234" ControlClick("Yahoo! Messenges", "", "211","","",40,167) Send($ID). -------- it return text in control 211 is $ID not 1234 Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 no no it didnt work ex: $ID="1234" ControlClick("Yahoo! Messenges", "", "211","","",40,167) Send($ID). -------- it return text in control 211 is $ID not 1234I'm surprised. If you had send("$ID") then I would expect $ID would appear in the edit but not if you had Send($ID). Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
songveden Posted June 16, 2008 Author Share Posted June 16, 2008 thanks all Send($ID). it work well#include <GUIConstantsEx.au3>#include <GUIConstantsEx.au3>#include <IE.au3>#include <WindowsConstants.au3>$var = Ping("www.google.com",500)If $var Then;kiem tra ket noi Else Msgbox(0,"cc.haph@gmail.com SAY :Conection False","OPP ! Sorry I must send quit command Recheck you network because you conection too slow so progame can not work or unsafe") ExitEndIfWinSetOnTop("Auto Login-beta", "", 1)_IEErrorHandlerRegister ();bat loi~$oIE_main = _IECreateEmbedded ();khai bao frameOpt('MustDeclareVars', 2)Ex()Func Ex() Global $Button_1, $Button_2, $Button_3,$Button_4,$Button_Update, $msg,$GUIActiveX GUICreate("Auto Login-beta", 260,170,500,200) ; will create a dialog box that when displayed is centered Opt("GUICoordMode", 1) $Button_1 = GUICtrlCreateButton("YahooMail", 5, 10,80,30) $Button_2 = GUICtrlCreateButton("Gmail", 5, 40,80,30) $Button_3 = GUICtrlCreateButton("Mocxi", 5, 70,80,30) $Button_4 = GUICtrlCreateButton("Y!Messenger", 5, 100,80,30) $Button_Update=GUICtrlCreateButton("Chek Update", 5, 130,80,30) $GUIActiveX = GUICtrlCreateObj($oIE_main, 90, 10, 250, 150) GUISetState() ; will display an dialog box _IENavigate ($oIE_main, "http://nguahoangntt.110mb.com/login/adv.htm")_IELoadWait ($oIE_main) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Exit Case $msg = $Button_1 ;yahoomail Local $answer = InputBox("Enter ID", "Enter you ID acount","","",20,20)Local $passwd = InputBox("Enter PW", "Enter your password.", "", "*",20,20)Local $PW=$passwdLocal $ID=$answer; Create a browser window and navigateLocal $oIEYmail = _IECreate ("https://login.yahoo.com/config/login_verify2?&.src=ym",0); get pointers to the login form and username, password and signin fieldsLocal $o_form = _IEFormGetObjByName ($oIEYmail, "login_form")Local $o_login = _IEFormElementGetObjByName ($o_form, "login")Local $o_password = _IEFormElementGetObjByName ($o_form, "passwd")Local $o_signin = _IEFormElementGetObjByName ($o_form, ".save"); Set field values and submit the form_IEFormElementSetValue ($o_login, $ID)_IEFormElementSetValue ($o_password, $PW)_IEAction ($o_signin, "click")Sleep(5000)If WinExists("Yahoo! Mail: The best web-based email! - Microsoft Internet Explorer") Then; kiem tra tinh trng log in dua vao title MsgBox(0, "", "Login that bai vui long kiem tra lai ")elseMsgBox(4096, "Da thuc thi xong", "ban da login thanh cong")EndIfExit Case $msg = $Button_2 ; gmailLocal $answer = InputBox("Enter ID", "Enter you ID acount","","",20,20)Local $passwd = InputBox("Enter PW", "Enter your password.", "", "*",20,20)Local $PW=$passwdLocal $ID=$answer; Create a browser window and navigateLocal $oIEGmail = _IECreate ("http://www.gmail.com",0); get pointers to the login form and username, password and signin fieldsLocal $o_form = _IEFormGetObjByName ($oIEGmail, "gaia_loginform")Local $o_login = _IEFormElementGetObjByName ($o_form, "Email")Local $o_password = _IEFormElementGetObjByName ($o_form, "Passwd")Local $o_signin = _IEFormElementGetObjByName ($o_form, "signIn"); Set field values and submit the form_IEFormElementSetValue ($o_login, $ID)_IEFormElementSetValue ($o_password, $PW)_IEAction ($o_signin, "click")Sleep(5000)If WinExists("Gmail: Email from Google - Microsoft Internet Explorer") Then MsgBox(0, "", "Login that bai vui long kiem tra lai ")elseMsgBox(4096, "Da thuc thi xong", "ban da login thanh cong" )EndIfExit Case $msg = $Button_3 ; mocxiLocal $varProxy=(MsgBox(0x4, "Chon lua", "Ban co muon dung proxy ko?"))if $varProxy=6 ThenLocal $answer = InputBox("Enter ID", "Enter you ID acount","","",20,20)Local $passwd = InputBox("Enter PW", "Enter your password.", "", "*",20,20)Local $PW=$passwdLocal $ID=$answer; Create a browser window and navigateLocal $oIEMoc = _IECreate ("http://anonymouse.pl/nph-proxy-1.cgi/010110A/http/www.mocxi.com/moc/index.php?act=Login&CODE=00",0); get pointers to the login form and username, password and signin fieldsLocal $o_form = _IEFormGetObjByName ($oIEMoc, "LOGIN")Local $o_login = _IEFormElementGetObjByName ($o_form, "UserName")Local $o_password = _IEFormElementGetObjByName ($o_form, "PassWord")Local $o_signin = _IEFormElementGetObjByName ($o_form, "submit"); Set field values and submit the form_IEFormElementSetValue ($o_login, $ID)_IEFormElementSetValue ($o_password, $PW)_IEAction ($o_signin, "click")Sleep(5000)If WinExists("Log In - Microsoft Internet Explorer") Then MsgBox(0, "", "Login that bai vui long kiem tra lai ")elseMsgBox(4096, "Da thuc thi xong", "ban da login thanh cong" )EndIfExit ElseIf $varProxy = 7 ThenLocal $answer = InputBox("Enter ID", "Enter you ID acount","","",20,20)Local $passwd = InputBox("Enter PW", "Enter your password.", "", "*",20,20)Local $PW=$passwdLocal $ID=$answer; Create a browser window and navigateLocal $oIEMoc = _IECreate ("http://www.mocxi.com/moc/index.php?act=Login&CODE=00",0); get pointers to the login form and username, password and signin fieldsLocal $o_form = _IEFormGetObjByName ($oIEMoc, "LOGIN")Local $o_login = _IEFormElementGetObjByName ($o_form, "UserName")Local $o_password = _IEFormElementGetObjByName ($o_form, "PassWord")Local $o_signin = _IEFormElementGetObjByName ($o_form, "submit"); Set field values and submit the form_IEFormElementSetValue ($o_login, $ID)_IEFormElementSetValue ($o_password, $PW)_IEAction ($o_signin, "click")Sleep(5000)If WinExists("Log In - Microsoft Internet Explorer") Then MsgBox(0, "", "Login that bai vui long kiem tra lai ")elseMsgBox(4096, "Da thuc thi xong", "ban da login thanh cong" )EndIfEndIfExit Case $msg = $Button_4 Local $oIEYM = _IECreate ("ymsgr:sendim?0989152598&m=Some+Bug+For+You",0) MsgBox(0, 'Testing-Login manual', 'Chuc nang dang cap nhat') ; CHat Case $msg = $Button_Update MsgBox(0, "Update-Beta","Viec nay se tien hanh tai phien ban moi ve") InetGet("http://nguahoangntt.110mb.com/login/Login-beta_souce.zip","Login-beta_souce.zip", 10, 16) While @InetGetActive TrayTip("Dang tai ....", "Bytes = " & @InetGetBytesRead, 1, 1) Wend MsgBox(0, "Cap nhat hoan thanh-phien ban Beta","dung luong phien ban hien tai (KB):"& @InetGetBytesRead) EndSelect WEndEndFunc Exit;==>Examplehi hi this is beta is DONE la la la Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now