Jump to content

Firefox Save File Dialog


jtucker
 Share

Recommended Posts

Hi all,

I am new to the forums so bear with me. I have tried searching around for quite a while for a solution to my problem but, I couldn't find any so I registered here to ask for help.

I am trying to automate the download of a file from a website using Ruby and FireWatir plus the WIN32OLE AutoItX3 Control. My script works fine if I am logged in, but fails if I run it as a scheduled task (with username/password) while noone is logged in. After doing some research it is now obvious that the win commands and the mouse move and click commands won't work without a user logged in.

I need a way to have the 'Save File' button pressed on the dialog that pops up when I try to download the file. I have tried using the ControlSend command to send an {ENTER} key press but that fails. Using the AutoIt window inspector I can see that the dialog box does not have a control ID. It seems my script will just skip over the AutoIt commands like WinWaitClose when I am not logged in.

Can anyone help me solve this problem? I have seen others with similar problems and the solution seems to be ControlSend, but that is not working for me. If AutoIt cannot perform what I want it to do, does anyone have an alternative program or solution I can try?

(I also have another script that needs to be able to log into a webpage using the windows authentication popup, and AutoIt isnt working there either when I am not logged in.)

Thanks,

jtucker

Link to comment
Share on other sites

It's because each user has his/her/its own desktop. I include "it" because the system account isn't a person and thus doesn't have a gender. The system account has its own set of windows that it is allowed to interact with. It cannot interact with another user's desktop. Not without weird tweaks anyways.

I have my scheduled task running as an admin on the remote machine for that reason. There still seems to be a problem interacting with the desktop. I need some "wierd tweaks" right about now! : )

Link to comment
Share on other sites

Well, the user my script runs under just happens to be part of the administrators group... but anyway. I didn't think this would be possible for the reasons you have stated and based on my research.

Would you be able to recommend any other way to pull a file from a webpage without using something that needs to be logged in or clicked to work?

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