2 Replies - 489 Views - Last Post: 08 July 2012 - 12:30 PM

#1 Gary_Leeds  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 08-July 12

Opening a list of URL in separate windows

Posted 08 July 2012 - 11:22 AM

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?

Thanks for your time
Gary

<!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://tinyurl.com/cfz4lmz")//;pausecomp(7000);closeWin();
myWindow=window.open("http://tinyurl.com/7cbpamn")//;pausecomp(7000);closeWin();
myWindow=window.open("http://bit.ly/KPz0Nd")//;pausecomp(7000);closeWin();
myWindow=window.open("http://tinyurl.com/bl4ck9y");pausecomp(7000);closeWin();
myWindow=window.open("http://tinyurl.com/7a278nl");pausecomp(7000);closeWin();
myWindow=window.open("http://tinyurl.com/cyd3q2l");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>



Is This A Good Question/Topic? 0
  • +

Replies To: Opening a list of URL in separate windows

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10784
  • View blog
  • Posts: 40,160
  • Joined: 27-December 08

Re: Opening a list of URL in separate windows

Posted 08 July 2012 - 12:20 PM

This is Javascript, not Java. I'll move this to the Javascript forum.
Was This Post Helpful? 0
  • +
  • -

#3 Gary_Leeds  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 08-July 12

Re: Opening a list of URL in separate windows

Posted 08 July 2012 - 12:30 PM

Thanks, sorry for the mistake
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1