Hi,<br><br>I am trying to get and then refresh a page in IE with a Python script. I just want to get a page, then refresh it every 5 minutes. Below is the code I am attempting. It is erroring out on the <br>id=ie.Document.Script._oleobj_.GetIDsOfNames('window.location.reload()') #tried with and without parens - reload & reload()<br>
line. This is mostly a borrowed script I found. The script was trying to call a written function on the page. I just want to call the build in reload function to refresh the page.<br> <br>Thanks for any help.<br><br>Kevin<br>
<br><br>import win32com.client, pythoncom<br>from time import sleep<br> <br>ie=win32com.client.Dispatch('internetexplorer.application')<br>ie.Visible=1<br>ie.Navigate('URL')<br>sleep(5) <br> <br>id=ie.Document.Script._oleobj_.GetIDsOfNames('window.location.reload()')<br>
while True:<br> res=ie.Document.Script._oleobj_.Invoke(id, 0, pythoncom.DISPATCH_METHOD, True)<br> sleep(300)<br><br>