Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Can anyone out there help me with the next few steps on this program that im having to do in my college. I tryed to get my instructor to break it down for me alittle more, but he really didnt know how. Here is the assignment:
Instructions: Create an access database called “blocker.mdb”. The database should contain a single table called “sitelist”. The sitelist table should contain a single text field called “url”. This table will contain urls that the application should block. Create a windows script that opens an Internet Explorer window. Again, you will use the “internetexplorer.application” object. When the user navigates to a new page, your program should open the blocker.mdb database and query to see if the new url the user has chosen is in the database. If it is, make the browser display a message saying that the site has been blocked. Your program should block based on the first part of the string in the database url field. For instance, if www.yahoo.com is in the database, then www.yahoo.com/news should also be blocked. Exit your script when internet explorer exits.
HERE'S WHAT I HAVE SO FAR
Set ie = WScript.CreateObject("internetexplorer.application", "ie_")
ie.visible = true
ie.navigate("www.yahoo.com")Set appAccess = CreateObject("Access.Application")
Any help would be greatly appreasheated. I have searched the MSDN site, but I can't seem to find all of what I need.
Thanks

I tryed to get my instructor to break it down for me alittle more, but he really didnt know how.
Didn't know how to break it down, or didn't know how to do it?First, you should initialize the Access (and maybe pull up the DB) before you create InternetExplorer.Application.
Second, your "main" body will probably look like this:
done = False
Do Until Done
WScript.Sleep 10000
LoopFinally, how you go about intercepting the website load is up to you, but I suggest Sub ie_BeforeNavigate2(pDisp, Url, Flags, TargetFrameName, PostData, Headers, Cancel). Just remember, you won't be able to use Cancel = True.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |