Question:

Help me with this program...?

by  |  earlier

0 LIKES UnLike

Hello everyone!!!

So, this is the thing:

I want to create a program that makes the following:

It directs my web browser (Apple Safari for Windows Vista, in my case) to a given web address. Then, I need to check if the browser has completely loaded the page. If it has, then it redirects to another page, and so on for two more pages.

At the end, it resets. In Safari, this means to delete the history, the cookies, the cache, the saved stuff, etc., but there's a special option that makes it (In Safari, go to Edition>Restore Safari).

So, I want to specifically know this:

1. How do I program it? Which programming language should I use, that is simple to amateurs like me? Where do I get it?

2. How do I write a code that:

a. Inputs an address into Safari and heads to it.

b. Checks if the page has loaded and, if it has, goes to another page.

c. Restores (or resets) Safari.

Of course, all this process is automatic after I press a key, or input a command.

To you all out there, I REALLY APPRECIATE ANY HELP YOU MAY GIVE ME. If you can help me freely, I thank you a lot, lot, lot. Or, if you're promoting some product or something that might turn to be useful for this, I AUTHORIZE you to contact me and inform me about it.

ONCE AGAIN, THANK YOU ALL VERY, VERY MUCH, AND HAVE A GREAT DAY!!!

 Tags:

   Report

2 ANSWERS


  1. A problem you're going to run into is, it depends on what Safari allows you to do. How much of Safari is exposed for programmers to use.

    If this were firefox, there is an extension called greasemonkey that allows you to write javascript and do some of the stuff you want.

    If this were Internet Explorer, there are Active X objects that implement the IE engine that you could embed and control from a program you write. These come standard with various versions of Visual Studio.

    But with Safari on Windows, It's hard to say. I think you would have better luck with Safari on Mac. Maybe do a search for Safari extensions (if such a thing exists) and see if there is something like greasemonkey.

    Here is the one for firefox:

    https://addons.mozilla.org/en-US/firefox...


  2. I don't know much about Safari but if it as reputable as FireFox or IE it won't let javascript or anything else just automatically "reset" Safari.  If there is such a way, nobody should be using Safari.

    At any rate, to do something after a page is fully loaded is fairly simple:

    <body onload="doSomething();" ...

    <script>

    function doSomething() {

       location.href = 'http://answers.yahoo.com';

    }

    </script>

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.