Re: How to click on arbitrary highlighted item
- From: Leslie Houk <lhouk@xxxxxxx>
- Date: Fri, 16 Jan 2009 15:19:51 -0800 (PST)
Tom,
Thanks for the response. I did try sending the Enter key, but it
doesn't seem to have any effect. Sending the Esc key will close the
warning, so I'm guessing that it only responds to the Escape key and
to being clicked on, which opens a drop-down menu of actions.
The code to download the file is a good idea as well, but I didn't
mention that the website I'm hitting is the front end for a database.
I get the file I want to download by clicking on an Export button,
which generates the file on the fly. So, an actual file which I could
download doesn't exist.
But again, thanks for the ideas, and please let me know if you have
any others.
Leslie
On Jan 16, 2:27 pm, Tom Lavedas <tglba...@xxxxxxx> wrote:
You could just send an Enter key, something like ...
oWSHShell.Sendkeys "{Enter}"
However, why don't you just download the file directly using something
like ...
Sub DownBinFile(FilePath, sURL)
const adTypeBinary = 1
const adModeReadWrite = 3
const adSaveCreateOverwrite = 2
' Create an xmlhttp object:
set oXML = CreateObject("MSXML2.XMLHTTP")
oXML.open "GET", sURL, False
oXML.send
With CreateObject("ADODB.Stream")
.type = adTypeBinary
.mode = adModeReadWrite
.open
Do Until oXML.readyState = 4 : Wscript.Sleep 50 : loop
.write oXML.responseBody
.savetofile FilePath, adSaveCreateOverwrite
End With
End Sub
Tom Lavedas
==========
.
- Follow-Ups:
- Re: How to click on arbitrary highlighted item
- From: Paul Randall
- Re: How to click on arbitrary highlighted item
- From: Tom Lavedas
- Re: How to click on arbitrary highlighted item
- References:
- How to click on arbitrary highlighted item
- From: Leslie Houk
- Re: How to click on arbitrary highlighted item
- From: Tom Lavedas
- How to click on arbitrary highlighted item
- Prev by Date: Reloading Original Page
- Next by Date: Re: Batch file (CMD) output into HTA
- Previous by thread: Re: How to click on arbitrary highlighted item
- Next by thread: Re: How to click on arbitrary highlighted item
- Index(es):