Results 1 to 4 of 4
  1. #1
    Gary_leeds is offline Member
    Join Date
    Jul 2012
    Posts
    2
    Rep Power
    0

    Default Opening a list of URLs in separate windows/tabs

    I am trying to automate getting free bonuses within a Facebook game. I have a list of URL addresses which I want to open one by one, leave the window open for 7 seconds to allow the page to load and get the bonus then automatically close the window and open the next url on the list.

    I have some code written which is doing most of what I want but the page doesn't seem to be uploading. Would someone who is more knowledgeable than me in JAVA please take a look and tell me where I am going wrong? This is my first attempt at writing in JAVA so apologies if I'm not sticking strictly to proper coding conventions :)

    Thanks for your time
    Gary

    Java Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript">
    function open_win()
    {
    myWindow=window.open("http://[removed by moderator]")//;pausecomp(7000);closeWin();
    myWindow=window.open("http://[removed by moderator]")//;pausecomp(7000);closeWin();
    myWindow=window.open("http://[removed by moderator]")//;pausecomp(7000);closeWin();
    myWindow=window.open("http://[removed by moderator]");pausecomp(7000);closeWin();
    myWindow=window.open("http://[removed by moderator]");pausecomp(7000);closeWin();
    myWindow=window.open("http://[removed by moderator]l");pausecomp(7000);closeWin();
    }
     
    function closeWin()
    {
    mywindow.close();
    }
     
    function pausecomp(ms) {
    ms += new Date().getTime();
    while (new Date() < ms){}
    }
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
     
    <body>
    <form>
    <input type="button" value="Open Windows" onclick="open_win()">
    </form>
    </body>
    </html>
    Last edited by DarrylBurke; 07-08-2012 at 09:20 PM. Reason: Removed suspicious links

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Opening a list of URLs in separate windows/tabs

    Opening a list of URLs in separate windows/tabs-hamhamster.jpg

    This is a Java forum.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Gary_leeds is offline Member
    Join Date
    Jul 2012
    Posts
    2
    Rep Power
    0

    Default Re: Opening a list of URLs in separate windows/tabs

    Well what a friendly forum this is. I apologies for making a mistake (that apparently when looking on google even top industry people make) but I do not feel that there is need for the sarcastic cartoon. It seems to me Mr Burke, you are one of these moderators that gets off on the power trip and belittling less experienced members, always glad to make someone feel small for making an error. Im glad there was no one that could help as this is not the kind of forum I would enjoy contributing to if that is the level of moderation taken here.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Opening a list of URLs in separate windows/tabs

    Another inflated ego; closing this thread.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Opening new windows
    By cfc1252 in forum AWT / Swing
    Replies: 9
    Last Post: 01-07-2012, 04:39 PM
  2. Replies: 4
    Last Post: 10-07-2009, 09:14 AM
  3. Manipulating URLs
    By TheFlying_Boy in forum Networking
    Replies: 0
    Last Post: 08-03-2009, 05:01 PM
  4. getting URLs
    By Shiv in forum Networking
    Replies: 3
    Last Post: 04-16-2009, 05:48 PM
  5. Should I separate my code into separate files?
    By Inks in forum New To Java
    Replies: 0
    Last Post: 03-26-2009, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •