Jump to content

Problem with Selecting combobox1 ,doesnt work on Save As window


Recommended Posts

Problem with Selecting combobox1 ,doesnt work on Save As window

I'am trying to download a file using IE on Windows XP , problem is sometimes it download half of the file and says download is complete (if i do it using the scripts) , however if i do it mannually it always works fine.

here is my code

If not WinActive('Save As') then WinActivate('Save As')

if controlcommand('Save As','','Combobox1','FindString','Desktop') <> 0 Then

controlcommand('Save As','','Combobox1','ShowDropDown','')

controlcommand('Save As','','Combobox1','SelectString','Desktop')

send(!s) ; send ALT +S to save file on desktop

; the above code does saves/downloads the file on desktop ,however the file is not complete. it downloads only half of the file.I'am surprised why is this happening? if repeat the same steps mannualy it does works fine.

if also tried the command

controlcommand('Save As','','Combobox1','SetCurrentSelection','Desktop')

this command doesnt works it selects "My Recent documents"

is this is can be a bug in AutoIT ???, if this is I'am gone....Can some one please help ... ?? if required i can paste/Attach the complete file

Well You can try it yourself also go http://www.autoitscript.com/code/

click on the download zip file button and do not download it completely just let Save As window to be open and execute the following code ..

if not WinActive("Save As") Then WinActivate("Save As")

If ControlCommand('Save As', '', 'ComboBox1', 'FindString', 'Desktop') <> 0 Then

ControlCommand('Save As', '', 'ComboBox1', 'SetCurrentSelection', 'Desktop')

EndIf

send("!s")

I'am not sure why the above code is selecting history in windows 2000 & "my recent documents" in windows xp

Edited by alix123
Link to comment
Share on other sites

Try ComboBox2 instead of ComboBox1

I used AutoIt Window Info tool and it shows ComboBox2

Edit: Corrected, Edit1 is embedded into the control

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Try ComboBox2 instead of ComboBox1

I used AutoIt Window Info tool and it shows ComboBox2

Edit: Corrected, Edit1 is embedded into the control

Even I'am using AutIT Window Info tool on windows XP & 2000 its showing me the ClassNameNN: ComboBox1.

although i can give a shot with ComboBox2, I just tried ,you are looking at Filename using window info tool , Iam looking at Save in combo box on the top of Save As window.

Save in Combo is Combobox1

Edited by alix123
Link to comment
Share on other sites

  • 2 years later...

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...