Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access secure website to download flat text files

Posted on 2004-04-05
5
Medium Priority
?
371 Views
Last Modified: 2010-05-02
I am trying to automate accessing a secure website in order to download three flat text files using VB's webbrowser control. I want to do this all behind the scenes because the operators for this application or not savvy enough to enter id's and passwords and download the files themselves.

The website requires an organization id, a password, and a selection of being a downloader (yes) or a representative (no) in the form of a radial/option button. Onces these items are filled in and seleted, then the user will typically click the Login button which will take them to the secure site to download the files.

From that point there is another selection process (selecting to download "all files" or files individually). And then the dialog box asking to open or save will come up (I want this hidden as well). I want to save to the local PC and then exit the site.

Any good places I can look for this information on "how-to" or any suggestions?

Thank you!
0
Comment
Question by:brownkj1
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
aelatik earned 2000 total points
ID: 10760429
You can use the Internet Explorer to navigate to that website in invisible mode and do your thing.

You navigate through it like this :

        Dim IE
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Navigate "http://www.go.com.mt/mygo/index.jsp"
        IE.Visible = True
        While IE.Busy
        DoEvents
        Wend
        IE.Document.All("msisdn").Value = "mynumber" ' contains the HTML name of the object
        IE.Document.All("password").Value = "mypassword" ' contains the HTML name of the object
        IE.Document.All("my_go_login").submit ' contains the HTML name of the object
0
 

Author Comment

by:brownkj1
ID: 10760800
Okay, all of that works great and I'm on the last leg of getting this completed (THANK YOU). One last question if you don't mind???

I am on the last step where I have to download the file itself. Problem is a dialog box pops up and says, "Open, Save To Disk, Cancel". I need this to be invisible as well and done behind the scenes. Would you be able to offer some suggestions on that as well?




0
 
LVL 14

Expert Comment

by:aelatik
ID: 10761004
Thats a difficult part, you can't hide it directly. But you can wait till it starts loading and then hide it. Try this out. ( I can't think of an other method )

        Dim IE
        Dim objShell
        Dim objShellWindows
        Set objShell = CreateObject("Shell.Application")
        Set objShellWindows = objShell.Windows
        Set IE = CreateObject("internetexplorer.application")
        Dim Done
            Done = False
        Do Until Done = True
        For Each IE In objShellWindows
            If LCase(IE.LocationURL) = "http://www.google.nl/" Then
                IE.Visible = True
                Done = True
            End If
        Next
        Loop
0
 

Author Comment

by:brownkj1
ID: 10761149
Is there no way to use the Silent property on the IE object? I can set Silent to true but I'm not sure how I can get to the "Save As" and save the actual file from there.

This doesn't open as a website, it opens as a file "save as" dialog box, therefore I don't think I can use the above scenario.

0
 

Author Comment

by:brownkj1
ID: 10761239
I am going to go ahead and give you the points for the answer you provided, which was excellant, to help me with my first and main problem. I will reopen the second issue as another question (which you're more than welcome to help on as well).

I think that would be fair, more so than making you answer two questions for one set of points!

Thanks again!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question