Log in

View Full Version : Opening a new window with a refresh



djkirstyjay
07-29-2007, 09:18 AM
Hi there... I am looking to do something that seems quite simple, but I just can't seem to do it! :confused:

I have been making a timelapse photo of a beach where I live with images taken from a webcam... the problem is, that I have to go out at the same time every day, but I still need the images every half hour to make up the middle bit, so I wanted to create a page that automatically refreshes after, say, half an hour... but when it refreshes, it opens the page in a new window, so that the last half hour's image is still there in my browser when I return.

Basically, I want the page to open itself in a new window after half an hour (or new tab, if possible, as I use firefox), rather than refreshing the image. That way I can just right click and save the lot when I get in.

Can anyone help?

Thanks is advance...

Kirsty

djr33
07-29-2007, 01:23 PM
tabs/new windows are browser defaults/user preferences. You can't control that, but it'll do what you want (on your computer anyway).

Having a new window open every hour could get tiring.

There are some better ways to go about this, perhaps, like just adding a new image to the page every hour.

You could try this--
<meta http-equiv="refresh" content="3600" target="_blank">
Not sure if target="_blank" works on the refresh, but it's worth a try.

Otherwise, it's definitely possible with javascript. But again, you might want to think about adding the images to the page, etc., instead.

Sliight
07-29-2007, 03:13 PM
Edit: This isn't the most efficient way by any means... but if you can't get the page to open in ...actually ack I just thought of a script here that would prolly work really well...

http://www.dynamicdrive.com/dynamicindex11/dhtmlprogress_old.htm

Use that... you can just set it on a 30 minute timer, then it can just pop a link in a blank page...


If you can't find a script that pops your new window every 30 minutes you can try this...

http://www.download.com/MacroMaker/3000-2094_4-10549107.html?tag=lst-3-9

This is a macro creator for your computer itself. Essentially it will record mouse movements and keyboard strokes. Now I'm not sure if this has a timer on it, but if it does, you just have it trigger every 30 minutes while on.

If it doesn't have a timer... I would create anywhere from 1 to 6 macros. The reason I mention the spread is because I don't know how large they end up being if you make macros that take anywhere from 5-30 minutes to execute. If they end up being very large files, you may want to make 6 5 minute macros.

Regardless of how many...you basically do this. First you create a short macro to figure out how they are named, and place it on your desktop in a certain position. Then you create your long macro... start it...leave for 28 or so minutes, then come back... do what you need to make it open a new page, then finish by clicking the very first macro you made.

Once these two are done, go back and edit your very first macro... change that macro to move your mouse and click your long macro that is your 30 minute timer.

So essentially now when you're ready do leave... you click your 30 minute macro, and it will open a new browser in 30 minutes, open up your window you want to be able to save, then it will trigger the short macro. The short macro goes back and triggers the long macro.... so you've just created a loop. You just turn it off when you get home.

Hopefully you can just create a timing trigger within the program which will save all of the above steps.

djkirstyjay
07-30-2007, 10:00 AM
Not sure if target="_blank" works on the refresh, but it's worth a try.No it doesn't. I've already tried. If only it were that simple! Thanks for the suggestion though...


Edit: This isn't the most efficient way by any means... but if you can't get the page to open in ...actually ack I just thought of a script here that would prolly work really well...

http://www.dynamicdrive.com/dynamici...ogress_old.htm

Use that... you can just set it on a 30 minute timer, then it can just pop a link in a blank page...I have looked at this and can't figure out how to get it to work. I'm not very au fait with Javascript. The page I'm using at present is quite simple... and is as follows :


<!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" xml:lang="en" >

<html>
<head>

<title>Webcam</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<META http-equiv="refresh" content="1800">

</head>

<body>



<div>
<p><img src="http://playafanabe.dyndns.org:1225/record/current.jpg" alt="" /></p>
</div>




</body>

</html>

The macro idea looks a little complicated too... however I'll have a quick go and see if I can get my head round it... :eek: ;)