Jump to content

downloading a file


Recommended Posts

i'm trying to write a script to automate an Internet explorer download:

Opt("WinTitleMatchMode", 4) 
(...)
_IEAction($submit,"click");
While 1
if WinExists("Bestand downloaden") Then
  WinActive("Bestand downloaden");
  ControlClick("","&Opslaan",4427)  
EndIf
#works OK

if WinExists("[CLASS:#32770]","") Then
  $SaveAs = WinGetHandle("[CLASS:#32770]")
  ControlSetText($SaveAs,"","[CLASS:ComboBox; INSTANCE:1]","c:\download\tdpayments.csv") ;d:\development\
  ControlClick($SaveAs,"","[CLASS:Button; TEXT:&Opslaan; INSTANCE:1]")
EndIf

if WinExists("Het downloaden is voltooid") Then
   WinActivate("Het downloaden is voltooid")
   ControlClick("","Sluiten",350)
   Exit
EndIf

Wend

the first if works perfect..

the second if doesnt work at all

it doesnt fill in the filename or click Opslaan (Save)

anyone who can be of help to me here?

Link to comment
Share on other sites

so i mean this window:

Posted Image

i need to :

a) change the directory (by putting it in the "bestandsnaam" field)

:) save it. (click "Opslaan")

i tryed several things to access the "bestandsnaam" field but for some reason i just cannot edit it's value...

in the field i see (with window info tool) a Combobox and an Edit control, both without a value

anyone?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...