FFMG - 2008-09-16

If you want to launch a real player you can use the am_execute(...) command in LUA, (or am.execute(...) in Python).

In the code bellow we look for the first argument, depending on the Value it will start BBC radio 1, BBC radio 4, or BBC radio 7.

Copy the code bellow in a file,
call the file 'bbc.lua', (or what ever you want to call it),
put the file in your root command directory.
Type [Caps Lock]+"this.reload"
and your BBC command should work.

------------------------------------------------------------------
-- Code
------------------------------------------------------------------
--[[
  Launch in bbc
]]--
function launch_bbc(x)
  local bbc = "";
  if x == '1' then
    bbc = "http://www.bbc.co.uk/radio1/realaudio/media/r1live.ram"
  elseif x == '7' then
    bbc = "http://www.bbc.co.uk/bbc7/realplayer/dsatg2.ram"
  else
    x   = '4'
    bbc = "rtsp://rmlive.bbc.co.uk/bbc-rbs/rmlive/ev7/live24/radio4/live/r4_dsat_g2.ra"
  end
 
  --
  -- Launch it now.
  --
  if false == am_execute( "%PROGRAMFILES%\\Real\\RealPlayer\\realplay.exe", bbc ) then
    -- and tell the user
    am_say( "<i>Starting BBC Radio " .. x .. "</i> - Failed.<br><b>" .. _VERSION .. "</b>", 400, 10  )
  else
    -- and tell the user
    am_say( "<i>Starting BBC Radio " .. x .. "</i><br><b>" .. _VERSION .. "</b>", 400, 10  )
  end
end

--[[
  Get the argument, (if any)
  And launch the BBC selected radio
 
  Arguments are :
    - 1 Radio 1
    - 4 Radio 4  - (default)
    - 7 Radio 7
]]--
bbc = am_getCommand( 1 )
launch_bbc( bbc )

------------------------------------------------------------------
-- Code
------------------------------------------------------------------

Of course this assumes that you have the real player installed.

F.