[j-say list] Listening to your favorite radio station from anywhere

  • From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
  • To: <j-say@xxxxxxxxxxxxx>
  • Date: Sun, 21 May 2006 16:13:17 +0530

Hi all,

One of the things I do very frequently on my computer is to listen to the
live audiostream from the BBC. I wanted to automate this process. In A Guide
to Advanced Scripting A Guide to Advanced Scripting 

for 

Dragon NaturallySpeakingR 8.x by Larry V. Allen (the book Brian recommended)
there is an example that launches a web page in Internetexplorer. See
chapter 8. I have adapted that example to launch the listen live link from
the bbcnews website. So now, where ever I am and I say "listenBBcWorld" the
audio stream comes up.    

This is an advanced scripting command. I have pasted its code below.

' This Command waits a maximum of 10 seconds For the BBC listen live web
page 

' to load. 

Dim objIE As Object 

Dim i As Integer 

Set objIE = CreateObject("InternetExplorer.Application") 

objIE.Visible = 1 

objIE.Navigate "http://www.bbc.co.uk/radio/aod/wservice.shtml";

i=1 

Do While i<100 ' a 10 second max in this loop 

 If objIE.readyState = 4 Then ' see if the page load is complete 

 i=100 ' End of Do While, 10 seconds elapsed 

 Else 

 Wait .1 ' Wait .1 seconds 

 i=i+1 

 End If 

Loop 

Set objIE = Nothing ' Our use of this object is complete 

Wait .1 ' A wait seems needed at the end, normally "done" 

Pranav


Other related posts:

  • » [j-say list] Listening to your favorite radio station from anywhere