Hi Guys,
Can someone please explain to a newbie like me how I can get the window handle of a Save As window when it starts to download a file, for example from an FTP site?
I'm using Internet Explorer to connect to the FTP site first, and am downloading three zipped files to deal with later.
But even though I've used WaitWindowOpen>Save As*, and that works, as soon as it begins downloading the file (and the file size counts up), it loses focus and the script continues!
Here's the attempted code I have so far (for 1 file), with an attempt to wait for the Save As window to close (which didn't work)
Let>Delay=2
Let>WIN_USEHANDLE=0
WaitWindowOpen>Save As*
SetFocus>Save As*
Wait>Delay
Press>Enter
WaitWindowClosed>Save As*
I bet this is really easy, but I haven't found anything on this in the forums so far!
Thanks
Save As window query
Moderators: Dorian (MJT support), JRL
GetWindowHandle
Try this:
GetWindowHandle>Save As*,SaveAs_hwnd
Gale
GetWindowHandle>Save As*,SaveAs_hwnd
Gale
Fixed it!
Thanks Gale - you pointed me in the right direction, and after much perseverence I realised that the window which opens up during file download actually starts with the name of the file being downloaded!
D'oh!
I was put off by seeing the counter showing how much data was being downloaded at the start of the window's title on screen.
And as each of the 3 files I'm downloading will always start with the same name before ending in a session number, I can use wildcards to pick it up, then SetFocus on it, and finally (what I really needed) use a WaitWindowClosed to make sure that the script doesn't move on before the file has been completely downloaded.
Me_Again - thanks for your suggestion, I hadn't tried MS's FTP stuff as yet, and as I'd spent a not-inconsiderable amount of time on the rest of the script (and that was working!), I wanted to fix what I had - and to understand for next time!
Thanks both - this really is a great forum and a superb program too!
Thanks Gale - you pointed me in the right direction, and after much perseverence I realised that the window which opens up during file download actually starts with the name of the file being downloaded!
D'oh!
I was put off by seeing the counter showing how much data was being downloaded at the start of the window's title on screen.
And as each of the 3 files I'm downloading will always start with the same name before ending in a session number, I can use wildcards to pick it up, then SetFocus on it, and finally (what I really needed) use a WaitWindowClosed to make sure that the script doesn't move on before the file has been completely downloaded.
Me_Again - thanks for your suggestion, I hadn't tried MS's FTP stuff as yet, and as I'd spent a not-inconsiderable amount of time on the rest of the script (and that was working!), I wanted to fix what I had - and to understand for next time!
Thanks both - this really is a great forum and a superb program too!