smita Posted November 29, 2007 Share Posted November 29, 2007 Hi, I have one script for log in application . #include <IE.au3> $oIE = _IECreate("www.--------login.php") WinSetState("","",@SW_MAXIMIZE) _IELoadWait($oIE) Sleep(1000) $o_Username = _IEGetObjByName($oIE ,"login") _IEFormElementSetValue ($o_Username ,"admin") $o_Password = _IEGetObjByName($oIE ,"password") _IEFormElementSetValue ($o_Password ,"admin") $o_Connect = _IEGetObjByName($oIE ,"btnconnect") _IEAction($o_Connect ,"click") _IELoadWait($oIE) while login into that application it will show on message "user is already logged in" where we have to click "OK" button . I want to include this in the scirpt, Can you please tell me how to include this message box & click on "OK" button with in the scirpt. Link to comment Share on other sites More sharing options...
Generator Posted November 29, 2007 Share Posted November 29, 2007 Hi, I have one script for log in application . #include <IE.au3> $oIE = _IECreate("www.--------login.php") WinSetState("","",@SW_MAXIMIZE) _IELoadWait($oIE) Sleep(1000) $o_Username = _IEGetObjByName($oIE ,"login") _IEFormElementSetValue ($o_Username ,"admin") $o_Password = _IEGetObjByName($oIE ,"password") _IEFormElementSetValue ($o_Password ,"admin") $o_Connect = _IEGetObjByName($oIE ,"btnconnect") _IEAction($o_Connect ,"click") _IELoadWait($oIE) while login into that application it will show on message "user is already logged in" where we have to click "OK" button . I want to include this in the scirpt, Can you please tell me how to include this message box & click on "OK" button with in the scirpt.If it's an Image which in most cases,you can try. #include <IE.au3> _IEImgClick ( ByRef $o_object, $s_linkText [, $s_mode = "src" [, $i_index = 0 [, $f_wait = 1]]] )Or if it's a button. #include <IE.au3> _IETagNameGetCollection ( ByRef $o_object, $s_TagName [, $i_index = -1] )If it's a text type. #include <IE.au3> _IELinkClickByText ( ByRef $o_object, $s_linkText [, $i_index = 0], $f_wait = 1]] )For Msgbox type just use ControlSend() or Send("{ENTER}") Link to comment Share on other sites More sharing options...
smita Posted November 29, 2007 Author Share Posted November 29, 2007 If it's an Image which in most cases,you can try.Or if it's a button.If it's a text type.For Msgbox type just use ControlSend() or Send("{ENTER}")Hi , thanks a lot .Somtimes I am able to login but sometimes after clicking on "Connect" button it will shows Message box, so how to write this in the script?What IEbodyreadtext will do? 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