FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

BBC Radio 4 Script

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
0bvious
Newbie


Joined: 25 Jul 2007
Posts: 2

PostPosted: Wed Jul 25, 2007 4:34 pm    Post subject: BBC Radio 4 Script Reply with quote

I have made a [i]very[/i] simple script that loads Internet Explorer and then the BBC Radio 4 web applet.

(This script will work for ANY url... Just edit the Start Radio4.js file and replace the URL with whatever you like)



Radio4.zip
 Description:
BBC Radio 4 Clicker Script

Download
 Filename:  Radio4.zip
 Filesize:  872 Bytes
 Downloaded:  983 Time(s)

Back to top
View user's profile Send private message Visit poster's website
gregoryh
Newbie


Joined: 16 Jan 2008
Posts: 7

PostPosted: Wed Jan 16, 2008 12:43 am    Post subject: Great, but.... Reply with quote

This is exactly what I wanted to do, but .... how can you turn it off?

There has to be a way to do this but I can't find out how to get hold of the browser after it has opened. I would like to have a list of different sites to navigate to and an option to close it.

I made a hack so that if e.g. iexplorer.exe was running it wouldn't open it again, but that is as far as I got - anyone else?

:?
Back to top
View user's profile Send private message
jae_63
Senior Member


Joined: 29 Mar 2006
Posts: 79
Location: Bethesda, MD

PostPosted: Wed Jan 16, 2008 5:25 pm    Post subject: Reply with quote

Clean solution: look at the provided "PowerPoint Quit.js" to give you a hint for how to terminate IE. Here's my best guess (untested):

var helper = new ActiveXObject("SCHelper.SECHelper");
if( helper.IsProcessRunning("iexplore.exe") ) {
var ie= new ActiveXObject("InternetExplorer.Application");
try {
ie.Quit();
}
catch (e) {}
}


----------------

Less clean solution: You can have your script invoke a third-party program like this to kill the running process:

http://www.beyondlogic.org/solutions/processutil/processutil.htm
Back to top
View user's profile Send private message
James Cridland
Newbie


Joined: 16 Jan 2008
Posts: 1

PostPosted: Fri Jan 18, 2008 11:35 am    Post subject: Reply with quote

If you're using this script, or another like it, you might like to know that you can get all the BBC stations this way. We will be making some changes to the iPlayer for Radio in late March, however; I'll try to ensure the URLs still link through correctly. Always good to see people linking into BBC content elsewhere.

You may find [url=http://backstage.bbc.co.uk/]BBC Backstage[/url] useful if you wish to use our stuff to build your stuff.

Not supported by the BBC, but possibly useful for you if you wish to enlarge the amount of stations available, would be [url=http://www.mediauk.com/api/]Media UK's API[/url] - it contains links to 547 UK radio and television players. (Disclaimer: Media UK's mine.)

--
James Cridland | Head of Future Media & Technology, BBC Audio & Music Interactive
Room 718 | Henry Wood House | 3-6 Langham Place | London W1B 3DF
Back to top
View user's profile Send private message
gregoryh
Newbie


Joined: 16 Jan 2008
Posts: 7

PostPosted: Sat Jan 26, 2008 11:24 am    Post subject: My latest attempt at Internet Radio - but still not 'nice Reply with quote

This is my latest version. The point is that I want to listen to the radio on my medis PC without turning on the projector hooked up to the PC, i.e. I want the whole interface on my phone. You can add a list of URLs to go to that have radio and then choose between them. You can also quit.

So; the issues...

1.) I can't seem to use getobject just new ActiveXObject. So there is a risk that there is a radio station already playing. (I would be quite happy to kill all internet explorer runtimes before I start because my screen is off).

2.) I always get a 'if you navigate away from this page the radio will stop'. James - that is your fault. At the moment I just press return blindly because I can't seem to either catch an event when the navigation has stopped, or wait until the browser has done it's stuff.

3.) I would like to bow out gracefully on quit but I can't see how to bow out of my script and hide the list. I probably just need to snoop around a bit more.

4.) Some of these radio stations lauch real player and seem to close explorer (not the beeb of course). This obviously gives me issues when I want to navigate away from them (and not listen to 2 radio stations at once).

Maybe someone else has some bright ideas



Internet Radio.zip
 Description:
Just add it to 'my clicker scripts' and add a link in the 'clicker Items'

Download
 Filename:  Internet Radio.zip
 Filesize:  1.7 KB
 Downloaded:  913 Time(s)

Back to top
View user's profile Send private message
gregoryh
Newbie


Joined: 16 Jan 2008
Posts: 7

PostPosted: Sat Jan 26, 2008 11:46 am    Post subject: Ps. Reply with quote

Actually I forgot the worst bits.

When I press back and go away from my menu I loose the link to my explorer and I can't change or close the radio station any more. If i could use get object then I could fix this or even if my 'ie' variable didn't get lost. I also have to do a rather naff check to see if ie points to internet explorer, the ie.name bit. There must be a cleaner way but I am fumbling in the dark.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group