views:

25

answers:

0

I've written an Applescript to play a selection of streaming video programmes available on the BBC iPlayer and, though it works OK, my network connection is prone to interruptions which eventually trip up the Flash script that does the clever stuff within Safari.

So, I'd like to to add the facility to check the network activity at intervals of a few minutes and if it has stalled, relaunch Safari. Unfortunately Safari's "Activity" window doesn't appear to offer access to Applescript, at least, not in a discrete way... I don't want any other windows in front of the video so the GUI method is not suitable. An alternative approach might be to get information about network traffic from a shell script using tcpdump, but I'm way out of my depth with command line stuff.

Apologies to US readers... the BBC's distribution rights means they make it difficult for anyone returning a non-UK IP to access their iPlayer, but any clues you can offer as to extracting the Safari Activity information or a shell script that simply returns the current number of bytes received would be most welcome.