Hello
I'm not going to pretend for one moment I am any good at this, but that thorny issue of getting Internet Explorer 7 to wait... This * appears * to work, but I am not sure truly, so absolutely no guarantees. This could be a starting point for someone else...
** start **
// Macro name here - Macro description here
// date of macro here
VBSTART
Dim IE
Dim RefreshIE
Dim starttime
Dim exittime
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
do while IE.Busy and Wait
loop
IE.navigate "http://www.YOURWEBSITEHERE.com"
do while ie.Busy and Wait
loop
Function BusyIE
BusyIE=0
starttime = Timer
exittime = starttime + 40
Do While ie.Busy And Not ie.ReadyState = 4:
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
If Timer > exittime Then
BusyIE=1
IE.Refresh
starttime = Timer
exittime = starttime + 40
End If
Loop
End Function
'** OLD IE 6 CODE **
'Function BusyIE
'BusyIE=0
'starttime = Timer
'exittime = starttime + 40
'do while IE.Busy
'If Timer > exittime Then
' BusyIE=1
' IE.Refresh
' starttime = Timer
' exittime = starttime + 40
'End If
'Loop
'End Function
VBEND
Wait>10
MouseMove>566,424
LClick
VBEval>BusyIE,Refresh
MouseMove>697,346
LClick
VBEval>BusyIE,Refresh
If>Refresh=1,errorsectionlabel
// this points to a label where you might want to move the cursor back up the screen and redo input etc on webpage **
** end **
Note on my computer two instances of IE7 start, but one stays in the background and just sits there. If I hide it, problems start, so I leave it
Hopes this helps with people's projects
Deano
Internet Explorer 7 Wait
Moderators: JRL, Dorian (MJT support)
Take Protected Mode in IE7 Off
Tools / Security / Untick Protected Mode
Then the old IE6 code should be fine.
Sorry folks, took a while and Marcus had posted on this elsewhere.
Then the old IE6 code should be fine.
Sorry folks, took a while and Marcus had posted on this elsewhere.
Deano