The project that I am currently working on, requires to gather data from a website. Once the data is found, the file associated with the data is downloaded to a directory. Simple.
Here is the problem, once the data is found, there is a download button to click to get the file. As you see in the code that I include, the first lines of the code the button is clicked and the file is starting to download. This is where the problem starts. The file download dialog appears and stops the automatic process.
The rest of the code that I have included, finds the file download dialog, and then locates the save button. Once the button's handle is located, it will proceed to click on it. Using Spy+, I can see that the message traffic is getting to the button, but there is no responding action.
I have also tried to move the mouse cursor to the middle of the button and send a mouse click call to force the same action. This hasn't accomplished the task either.
Now, there was an automatic download feature in IE, but that has been removed, in WIn7. In XP, the feature is still there, but the same action of the file download dialog is present.
The question that I have, has anyone found a solution to this problem? Could changing the mime type of the download file to be included in the safe downloads solve this?