autoitxp Posted January 6, 2008 Share Posted January 6, 2008 (edited) Hi hay i want to fix this this is poping up input data after loading whole page how to popup msg before loading page? expandcollapse popup#include <IE.au3> HotKeySet("{ESC}", "_Quit") Local $sHwnd, $window, $len, $oIE, $inserthead ,$sTexts, $colForms, $iFormCnt, $iForm, $sMsg, $oForm, $iElemCnt, $iElem, $surl, $filewriter, $fHandle, $char, $socket, $TotalSize While 1 $sHwnd = WinGetHandle("", "") $oIE = _IEAttach($sHwnd, "HWND") If _IEPropertyGet($oIE , "busy") Then _IELoadWait($oIE) If @error Then Else $sTexts = _IEBodyReadHTML($oIE) $colForms = _IEFormGetCollection($oIE) $iFormCnt = @extended $iForm = 0 $sMsg = "Element values:" & @CRLF For $oForm In $colForms $colElem = _IEFormElementGetCollection($oForm) $iElemCnt = @extended $iElem = 0 For $oElem In $colElem $sMsg &= "Form " & $iForm & ": Elem " & $iElem & ": " & _IEFormElementGetValue($oElem) & @CRLF $iElem += 1 Next $iForm += 1 Next MsgBox (64 , "" , @CRLF &_IEPropertyGet($oIE, "locationurl") &@CRLF & $iElemCnt & " " & "Results:" & @CRLF & $sMsg & @CRLF) EndIf EndIf Sleep(20) WEnd Func _Quit() _IEQuit($oIE) Exit EndFunc Edited January 6, 2008 by autoitxp Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 6, 2008 Share Posted January 6, 2008 Hi hay i want to fix this this is poping up input data after loading whole page how to popup msg before loading page? By inserting MsgBox() wherever you want it...? (Sanitized of the psychotic white space): #include <IE.au3> HotKeySet("{ESC}", "_Quit") Local $sHwnd, $window, $len, $oIE, $inserthead, $sTexts, $colForms, $iFormCnt, $iForm, $sMsg, $oForm, $iElemCnt, $iElem, $surl, $filewriter, $fHandle, $char, $socket, $TotalSize While 1 $sHwnd = WinGetHandle("", "") $oIE = _IEAttach($sHwnd, "HWND") If _IEPropertyGet($oIE, "busy") Then _IELoadWait($oIE) If @error = 0 Then $sTexts = _IEBodyReadHTML($oIE) $colForms = _IEFormGetCollection($oIE) $iFormCnt = @extended $iForm = 0 $sMsg = "Element values:" & @CRLF For $oForm In $colForms $colElem = _IEFormElementGetCollection($oForm) $iElemCnt = @extended $iElem = 0 For $oElem In $colElem $sMsg &= "Form " & $iForm & ": Elem " & $iElem & ": " & _IEFormElementGetValue($oElem) & @CRLF $iElem += 1 Next $iForm += 1 Next MsgBox(64, "", @CRLF & _IEPropertyGet($oIE, "locationurl") & @CRLF & $iElemCnt & " " & "Results:" & @CRLF & $sMsg & @CRLF) EndIf EndIf Sleep(20) WEnd Func _Quit() _IEQuit($oIE) Exit EndFunc ;==>_Quit Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
autoitxp Posted January 7, 2008 Author Share Posted January 7, 2008 (edited) well thanks man but when i go to url like hotmail.com and enter ma user and password and click on sign in button its not poping up i think coz it getting form info after loading page can i get info before loading ? Edited January 7, 2008 by autoitxp Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 7, 2008 Share Posted January 7, 2008 well thanks man but when i go to url like hotmail.com and enter ma user and password and click on sign in button its not poping up i think coz it getting form info after loading page can i get info before loading ?Read the help file entries and examples more closely under the _IE* "click" functions. Different situations require different methods. Sometimes it's a matter of giving the button object "focus" and then just Send("{ENTER}") to get the page to behave. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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