Re: Problems in Waiting for Web page to Open



"PaulFXH"
[CUT]
Although the script does what it is supposed to do
[CUT]

Tried time ago ONLY the first part .. don't remember if it wassuccessful :

you need autoit beta http://www.autoitscript.com/autoit3/files/beta/autoit/
and IE.au3 >>>> (IE_T2.0_3.au3)
http://www.autoitscript.com/forum/index.php?s=e3ca66c936d6d258c7c5943c15e03d01&showtopic=25629



#include <IE.au3> ; or IE_T2.0_3.au3
$oIE = _IECreate()
_IENavigate($oIE, "http://www.bitdefender.com/scan8/ie.html";)

;$oForm = _IEFormGetObjByName($oIE, "loginForm")
;$oQuery = _IEFormElementGetObjByName($oForm, "I Agree")
;$oQuery2 = _IEFormElementGetObjByName($oForm, "Click here to scan")
;$oButton = _IEFormElementGetObjByName($oForm, "ok")

;_IEFormElementSetValue($oQuery, "I Agree")
;_IEFormElementSetValue($oQuery2, "")
Sleep(1500)
; _IEClickImg($oIE , "Ok", "alt", 0, 1)
_IEClickImg($oIE, "I Agree", "name", 0, 1)
;_IEClickImg($oForm, "Ok")
; MsgBox(262144, "", _IEIsFrameSet($oIE)) ; no 0
;MsgBox(262144, "", _IEIsFrameSet($oForm)) ; no
;MsgBox(262144, "",_IEDocumentGetObj($oIE)) ; YES
_IEFormSubmit($oForm)
; MsgBox(262144, "",_IEFormElementGetCount($oForm))

; ecc

; the script is an old example now implemeted with :

Function Name: _IECreate()
Func _IECreate($s_Url = "about:blank", $f_tryAttach = 0, $f_visible = 1, $f_wait = 1, $f_takeFocus = 1)

; Description: Create an Internet Explorer Browser Window
; Parameter(s): $s_Url - Optional: specifies the Url to navigate to upon creation
; $f_tryAttach - Optional: specifies whether to try to attach to an existing window
; 0 = (Default) do not try to attach
; 1 = Try to attach to an existing window
; $f_visible - Optional: specifies whether the browser window will be visible
; 0 = Browser Window is hidden
; 1 = (Default) Browser Window is visible
; $f_wait - Optional: specifies whether to wait for page to load before returning
; 0 = Return immediately, not waiting for page to load
; 1 = (Default) Wait for page load to complete before returning
; $f_takeFocus - Optional: specifies whether to bring the attached window to focus
; 0 = Do Not Bring window into focus
; 1 = (Default) bring window into focus
; Requirement(s): AutoIt3 Beta with COM support (post 3.1.1)
; Return Value(s): On Success - Returns an object variable pointing to an InternetExplorer.Application object
; On Failure - Returns 0 and sets @ERROR = 1
; @Extended - Set to true (1) or false (0) depending on the success of $f_tryAttach
; Author(s): Dale Hohm


More in IE_T2.0_3.au3 >> C:\PROGRA~1\AUTOIT3\INCLUDE\IE_T20~1.AU3

--
Fosco


.