pramodgn Posted July 29, 2011 Share Posted July 29, 2011 (edited) Hi All, expandcollapse popup;Input useful files #include <Process.au3> #include <GuiConstantsEx.au3> #include <IE.au3> #include <GuiEdit.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $destination, $font, $UserInput, $UserPass, $UserID, $button_submit, $msg, $oIE, $n $hGUI = GUICreate("Norsker Skogindustrier System v.1.1", 400, 250) $font = "Comic Sans MS" ;==> Font changes $destination = ".\Image\AutoIT.bmp" GUISetFont(9, 400, 1, $font) GUICtrlCreatePic($destination,10,5,380,60) ;==> Creating pics of autosystem ;======================================================================================= ;Creating design format for input ;======================================================================================= $UserInput = GUICtrlCreateGroup("User Input",40,80,320,150) GUICtrlCreateLabel("Domain User ID :", 50, 100,180,20) $UserID = GUICtrlCreateInput("",150,100,200,20) GUICtrlCreateLabel("Domain Password :", 50, 140,180,20) $UserPass = GUICtrlCreateInput("", 150, 140, 200, 20, $ES_PASSWORD) $button_submit = GUICtrlCreateButton("Submit", 240, 180, 110, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_submit $oIE = _IECreate ("XXX", 0) _IELoadWait ($oIE) Send(GUICtrlRead($UserID)) Send("{TAB}") Send(GUICtrlRead($UserPass)) Send("{TAB}") Send("{ENTER}") WinWait("Windows Internet Explorer") (This is not working) MsgBox(1,"Loaded","Loaded") ;sleep(50000) ;Send("{TAB 25}") ;Send("{ENTER}") ;Send("{TAB 5}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 1}") ;Send("NSI") ;Send("{TAB 42}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 38}") ;Send("1/03/2010") ;Send("{ENTER}") ;ProcessWait("notepad.exe") ;msgbox (1,"OK","OK") EndSelect WEnd EndFunc ;==>_Main How do i put wait time in my code Regards Pramod Edited July 29, 2011 by pramodgn Link to comment Share on other sites More sharing options...
wakillon Posted July 29, 2011 Share Posted July 29, 2011 like this expandcollapse popup;Input useful files #include <Process.au3> #include <GuiConstantsEx.au3> #include <IE.au3> #include <GuiEdit.au3> Opt('MustDeclareVars', 1) ;$rc = _RunDos("start https://svcmgt.emea.hp.com/sc/index.do") ;MouseClick("Left",200,45) _Main() Func _Main() Local $hGUI, $destination, $font, $UserInput, $UserPass, $UserID, $button_submit, $msg, $oIE, $n $hGUI = GUICreate("Norsker Skogindustrier System v.1.1", 400, 250) $font = "Comic Sans MS" ;==> Font changes $destination = ".\Image\AutoIT.bmp" GUISetFont(9, 400, 1, $font) GUICtrlCreatePic($destination,10,5,380,60) ;==> Creating pics of autosystem ;======================================================================================= ;Creating design format for input ;======================================================================================= $UserInput = GUICtrlCreateGroup("User Input",40,80,320,150) GUICtrlCreateLabel("Domain User ID :", 50, 100,180,20) $UserID = GUICtrlCreateInput("",150,100,200,20) GUICtrlCreateLabel("Domain Password :", 50, 140,180,20) $UserPass = GUICtrlCreateInput("", 150, 140, 200, 20, $ES_PASSWORD) $button_submit = GUICtrlCreateButton("Submit", 240, 180, 110, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_submit $oIE = _IECreate ("XXX", 0) _IELoadWait ($oIE) Send(GUICtrlRead($UserID)) Send("{TAB}") Send(GUICtrlRead($UserPass)) Send("{TAB}") Send("{ENTER}") WinWait("Windows Internet Explorer") (This is not working) MsgBox(1,"Loaded","Loaded") ;sleep(50000) ;Send("{TAB 25}") ;Send("{ENTER}") ;Send("{TAB 5}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 1}") ;Send("NSI") ;Send("{TAB 42}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 38}") ;Send("1/03/2010") ;Send("{ENTER}") ;ProcessWait("notepad.exe") ;msgbox (1,"OK","OK") EndSelect Sleep ( 10 ) WEnd EndFunc ;==>_Main AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
pramodgn Posted July 29, 2011 Author Share Posted July 29, 2011 like this expandcollapse popup;Input useful files #include <Process.au3> #include <GuiConstantsEx.au3> #include <IE.au3> #include <GuiEdit.au3> _Main() Func _Main() Local $hGUI, $destination, $font, $UserInput, $UserPass, $UserID, $button_submit, $msg, $oIE, $n $hGUI = GUICreate("Norsker Skogindustrier System v.1.1", 400, 250) $font = "Comic Sans MS" ;==> Font changes $destination = ".\Image\AutoIT.bmp" GUISetFont(9, 400, 1, $font) GUICtrlCreatePic($destination,10,5,380,60) ;==> Creating pics of autosystem ;======================================================================================= ;Creating design format for input ;======================================================================================= $UserInput = GUICtrlCreateGroup("User Input",40,80,320,150) GUICtrlCreateLabel("Domain User ID :", 50, 100,180,20) $UserID = GUICtrlCreateInput("",150,100,200,20) GUICtrlCreateLabel("Domain Password :", 50, 140,180,20) $UserPass = GUICtrlCreateInput("", 150, 140, 200, 20, $ES_PASSWORD) $button_submit = GUICtrlCreateButton("Submit", 240, 180, 110, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_submit $oIE = _IECreate ("XXX", 0) _IELoadWait ($oIE) Send(GUICtrlRead($UserID)) Send("{TAB}") Send(GUICtrlRead($UserPass)) Send("{TAB}") Send("{ENTER}") WinWait("Windows Internet Explorer") (This is not working) MsgBox(1,"Loaded","Loaded") ;sleep(50000) ;Send("{TAB 25}") ;Send("{ENTER}") ;Send("{TAB 5}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 1}") ;Send("NSI") ;Send("{TAB 42}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 38}") ;Send("1/03/2010") ;Send("{ENTER}") ;ProcessWait("notepad.exe") ;msgbox (1,"OK","OK") EndSelect Sleep ( 10 ) WEnd EndFunc ;==>_Main if i put sleep (10) then also its not working, basic problem is after logging into internet explore it will navigate into different internet explore, first IE_Wait work after that what should i do to keep same window wait till it is being processed. thanks pramod Link to comment Share on other sites More sharing options...
wakillon Posted July 29, 2011 Share Posted July 29, 2011 did you try $_WinWait = WinWait("Windows Internet Explorer", 3 ) ;(This is not working) If $_WinWait Then MsgBox(1,"Loaded","Loaded") AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
pramodgn Posted July 29, 2011 Author Share Posted July 29, 2011 did you try $_WinWait = WinWait("Windows Internet Explorer", 3 ) ;(This is not working) If $_WinWait Then MsgBox(1,"Loaded","Loaded") Still not working sir Link to comment Share on other sites More sharing options...
wakillon Posted July 29, 2011 Share Posted July 29, 2011 Arg !! And this ? While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_submit $oIE = _IECreate ("XXX", 0) _IELoadWait ($oIE) Send(GUICtrlRead($UserID)) Send("{TAB}") Send(GUICtrlRead($UserPass)) Send("{TAB}") Send("{ENTER}") EndSelect $_WinWait = WinWait("Windows Internet Explorer", 3 ) ; Perhaps with a title more precise... If $_WinWait Then MsgBox(1,"Loaded","Loaded") WEnd AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
pramodgn Posted July 29, 2011 Author Share Posted July 29, 2011 $_WinWait = WinWait("ServiceCenter Windows Internet Explorer", 3 ); title If $_WinWait Then MsgBox(1,"Loaded","Loaded") still now working expandcollapse popup;Input useful files #include <Process.au3> #include <GuiConstantsEx.au3> #include <IE.au3> #include <GuiEdit.au3> _Main() Func _Main() Local $hGUI, $destination, $font, $UserInput, $UserPass, $UserID, $button_submit, $msg, $oIE, $n, $_WinWait $hGUI = GUICreate("Norsker Skogindustrier System v.1.1", 400, 250) $font = "Comic Sans MS" ;==> Font changes $destination = ".\Image\AutoIT.bmp" GUISetFont(9, 400, 1, $font) GUICtrlCreatePic($destination,10,5,380,60) ;==> Creating pics of autosystem ;======================================================================================= ;Creating design format for input ;======================================================================================= $UserInput = GUICtrlCreateGroup("User Input",40,80,320,150) GUICtrlCreateLabel("Domain User ID :", 50, 100,180,20) $UserID = GUICtrlCreateInput("",150,100,200,20) GUICtrlCreateLabel("Domain Password :", 50, 140,180,20) $UserPass = GUICtrlCreateInput("", 150, 140, 200, 20, $ES_PASSWORD) $button_submit = GUICtrlCreateButton("Submit", 240, 180, 110, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_submit $oIE = _IECreate ("https://svcmgt.emea.hp.com/sc/index.do", 0) _IELoadWait ($oIE) Send(GUICtrlRead($UserID)) Send("{TAB}") Send(GUICtrlRead($UserPass)) Send("{TAB}") Send("{ENTER}") ;sleep(50000) ;Send("{TAB 25}") ;Send("{ENTER}") ;Send("{TAB 5}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 1}") ;Send("NSI") ;Send("{TAB 42}") ;Send("{ENTER}") ;sleep(10000) ;Send("{TAB 38}") ;Send("1/03/2010") ;Send("{ENTER}") ;ProcessWait("notepad.exe") ;msgbox (1,"OK","OK") ;---------------------------------------------------------- ; Navigate to Menu ;---------------------------------------------------------- EndSelect WEnd $_WinWait = WinWait("ServiceCenter Windows Internet Explorer", 3 );(This is not working) If $_WinWait Then MsgBox(1,"Loaded","Loaded") EndFunc ;==>_Main Link to comment Share on other sites More sharing options...
wakillon Posted July 29, 2011 Share Posted July 29, 2011 still now workingGreat, and sorry i was a bit slow to undestand what you want !certainly due to age ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
pramodgn Posted July 29, 2011 Author Share Posted July 29, 2011 (edited) Great, and sorry i was a bit slow to undestand what you want !certainly due to age ! I want to login to one web - base application, where u have to punch in your user name and password after submit wait till the web base application is fully loaded (I have put IE_Wait for that). Then after submitting it should it will redirect to IE title "ServiceCenter Windows Internet Explorer". Now this will also take some time so am trying to put wait here (This is where am not able to code) and next step is to put 25 tab and click on to that button.How to put _IELoadWait ($oIE) wait time after redirecting?????? Edited July 29, 2011 by pramodgn 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