Scripts
Moderator:Æron
Any way to make a script to make a blank firefox or internet explorer page load up to random pages every three minutes? And what code editor are you using?
I wonder if it'll finally get it's own forum too. I've always wanted a place online where I can talk about O&M.
Math is NEVER overrated. Math is the key to upholding the modern world.
It takes language to build a society, but math and science to build a world.
~Tum0spoo
- VisibilityMissing
- Posts:1278
- Joined:Mon Jun 14, 2004 8:31 pm
- Location:Oak Park, near Chicago, Illinois
Take a look in the <a href='http://webmonkey.wired.com/webmonkey/re ... e_library/' target='_blank'>Webmonkey Javascript Library.</a> You might find something in there.
"The beauty of this is that it is only of theoretical importance,
and there is no way it can be of any practical use whatsoever."
- Sidney Harris
"Perhaps they've discovered the giant whoopee cushion I hid
under the Arctic National Wildlife Refuge." http://ozyandmillie.org/2002/01/03/ozy-and-millie-819/
and there is no way it can be of any practical use whatsoever."
- Sidney Harris
"Perhaps they've discovered the giant whoopee cushion I hid
under the Arctic National Wildlife Refuge." http://ozyandmillie.org/2002/01/03/ozy-and-millie-819/
-
- Posts:4297
- Joined:Wed Oct 20, 2004 5:08 pm
- Location:On hiatus
- Contact:
<!--c1--> <table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--><html><br><head><br> <title>Blah</title><br></head><br><body><br><script type="text/javascript"><br>// generate content iframe<br>document.body.innerHTML = document.body.innerHTML +<br> '<iframe name="main" id="main" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;border:none;"/>';<br><br>// Populate sites<br>var sites = Array (<br> 'http://www.ozyandmillie.org/',<br> 'http://www.idrewthis.org/',<br> 'http://definecynical.mancubus.net/forum/',<br> 'http://ireadthis.abort-retry-ignore.net/',<br> 'http://www.google.com/'<br>);<br><br>// Function to place site in iframe<br>function replaceUrl(siteUrl) {<br> document.getElementById('main').setAttribute('src', siteUrl);<br>}<br><br>// Function to generate random url from list<br>function rand() {<br> var x = Math.floor(Math.random() * 5);<br> if (x > 4) x = 4;<br> return sites[x];<br>}<br><br><br><br>// Function to run script<br>function loadNewUrl() {<br><br> var url = rand();<br> replaceUrl(url);<br> setTimeout('loadNewUrl();', 180000);<br>}<br><br>loadNewUrl();<br></script><br></body><br></html><!--c2--></td></tr></table> <!--ec2--><br>The above script will match those specifications (load up a random page every 3 minutes).
Thank you Niner.<br><br>Looks pretty understandable for a forgetfull person like myself. Since it looks like C++, I should be able to learn how to write scripts.
I wonder if it'll finally get it's own forum too. I've always wanted a place online where I can talk about O&M.
Math is NEVER overrated. Math is the key to upholding the modern world.
It takes language to build a society, but math and science to build a world.
~Tum0spoo
-
- Posts:4297
- Joined:Wed Oct 20, 2004 5:08 pm
- Location:On hiatus
- Contact:
Well, JavaScript <i>does</i> use C syntax ... for the most part. (BTW, <a href='http://www.ecma-international.org/publi ... MA-262.pdf' target='_blank'>here</a> is the official specification for it.)
Who is online
Users browsing this forum: No registered users and 10 guests