RamRod – BBC7 Flavour

I’m home sick today.

So here’s a quick post with a tool that I wrote to speed up my access to BBC7’s spoken word/audio books shows.

RamRod: BBC7 Flavour

RamRod has been custmized for BBC7 Links

As many of you know, I often spend hours listening to England’s BBC7 radio stream. They re-air all of the serialized Sci Fi, mystery, comedy and Drama radio shows that were broadcast in the last century in the BBC and sometimes in the US.

They have a listen again feature that allows you to listent to any of the shows you’ve missed in the last week. This program helps make that easier. So while I am home sick today, I can click on the 7th Dimension button and can listen to their Monday Sci Fi show, an unabbidged reading of Day of the Triffids. When that show is over, I just select Tuesday and click the go button and I’m on to the next show. Since, BBC7 is on a weekly rotating schedule, I can do that for all of the shows, for instance the Crime and Thriller hour is featuring a dramatization of Sara Paretsky VI Warshawski’s novel Deadlock. Since I am a week behind I can easily click through the episodes as I catch up.

In any case, maybe someone will find this useful. It’s great to be able to hear Michaela say “Saturday at 11 on BBC7” and within three clicks, be listening to it…

A working screen shot of The Code Cave's Ram Rod program, BBC7 Flavour.

This Delphi demo with source shows how to download a file from the interenet.
Downloads:
Here is the EXE: http://www.thecodecave.com/downloads/delphi/RamRod4BBC7.exe
Source:

Here is the ZIP of exe and source: http://www.thecodecave.com/downloads/delphi/ramrod4bbc7.zip
Here is the source:
[delphi]
// ****************************************************************************
// RamRod_Main 13/Jun/2005
//
// Written by Brian Layman (AKA Capt. Queeg AKA SilverPaladin)
// Visit him at http://www.TheCodeCave.com
//
// This is a simple demonstration to show how a Delphi program can be used
// as a downloading agent.
//
// Warning: I can’t think of any way that this routine could cause harm to .
// your computer, but it is a good best practice to understand every line
// of new code before you run it. Who knows what could be lurking. Better
// yet, do not run this example at all. You should stop right now and erase
// the files. For if it causes blue smoke to be emitted from your network
// card, if it erases all users from your computer, or if it makes your
// sister break up with her lawyer boyfriend and start dating a caver, it
// is not my fault. (Actually that last one might be an improvement, but
// it is still not my fault.) But the fact of the matter is, computers
// have a mind of their own and we programmers live on the wild side.
//
// Usage: RamRod.exe
// Chose a specific day and time combo and click the button.
// Configure realPlayer to queue the tracks as they come in and you can
// quickly configure realPlayer to play a weeks worth or more of shows in
// succession.
//
// History:
// 13/Jun/2005 – BL – Created
//
// ****************************************************************************
unit RamRod_Main;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, OleCtrls, SHDocVw, mshtml, ExtCtrls;

type
TfrmRamRod = class(TForm)
WebBrowser1: TWebBrowser;
rgrpDays: TRadioGroup;
Panel1: TPanel;
editAddress: TEdit;
btnGo: TButton;
rgrpHours: TRadioGroup;
rgrpMinutes: TRadioGroup;
Panel2: TPanel;
Button1: TButton;
Button2: TButton;
xboxSecond: TCheckBox;
Button3: TButton;
Label1: TLabel;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button12: TButton;
procedure btnGoClick(Sender: TObject);
procedure rgrpDaysClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Button12Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
frmRamRod: TfrmRamRod;

implementation

{$R *.DFM}

{******************************************************************************
btnGoClick
Grab the RAM file
******************************************************************************}
procedure TfrmRamRod.btnGoClick(Sender: TObject);
var
Flags: OLEVariant;
begin // btnGoClick
// Set the flags so that there is no history kept of this visit.
Flags := navNoHistory;

// Go to the specified website
WebBrowser1.Navigate(WideString(editAddress.Text), Flags);
end; // btnGoClick

{******************************************************************************
rgrpDaysClick
Update the web address
******************************************************************************}
procedure TfrmRamRod.rgrpDaysClick(Sender: TObject);
begin // rgrpDaysClick
editAddress.Text := ‘http://www.bbc.co.uk/bbc7/listenagain/’ + lowercase(rgrpDays.Items.Strings[rgrpDays.ItemIndex]) + ‘/rams/’ + rgrpHours.Items.Strings[rgrpHours.ItemIndex] + rgrpMinutes.Items.Strings[rgrpMinutes.ItemIndex] + ‘.ram’;
end; // rgrpDaysClick

{******************************************************************************
Button1Click
******************************************************************************}
procedure TfrmRamRod.Button1Click(Sender: TObject);
begin // Button1Click
// SciFi
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 18;
rgrpMinutes.ItemIndex := 0;
end
else begin
rgrpHours.ItemIndex := 0;
rgrpMinutes.ItemIndex := 0;
end;
end; // Button1Click

{******************************************************************************
Button2Click
******************************************************************************}
procedure TfrmRamRod.Button2Click(Sender: TObject);
begin // Button2Click
// Best Seller
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 18;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 0;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button2Click

{******************************************************************************
Button3Click
******************************************************************************}
procedure TfrmRamRod.Button3Click(Sender: TObject);
begin // Button3Click
// Best Seller 2
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 18;
rgrpMinutes.ItemIndex := 3;
end
else begin
rgrpHours.ItemIndex := 0;
rgrpMinutes.ItemIndex := 3;
end;
end; // Button3Click

{******************************************************************************
Button4Click
******************************************************************************}
procedure TfrmRamRod.Button4Click(Sender: TObject);
begin // Button4Click
// Crime
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 09;
rgrpMinutes.ItemIndex := 0;
end
else begin
rgrpHours.ItemIndex := 20;
rgrpMinutes.ItemIndex := 0;
end;
end; // Button4Click

{******************************************************************************
Button5Click
******************************************************************************}
procedure TfrmRamRod.Button5Click(Sender: TObject);
begin // Button5Click
// Thriller
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 09;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 20;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button5Click

{******************************************************************************
Button6Click
******************************************************************************}
procedure TfrmRamRod.Button6Click(Sender: TObject);
begin // Button6Click
// Drama
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 10;
rgrpMinutes.ItemIndex := 0;
end
else begin
rgrpHours.ItemIndex := 13;
rgrpMinutes.ItemIndex := 0;
end;
end; // Button6Click

{******************************************************************************
Button8Click
******************************************************************************}
procedure TfrmRamRod.Button8Click(Sender: TObject);
begin // Button8Click
// Comedy 2
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 08;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 22;
rgrpMinutes.ItemIndex := 0;
end
end; // Button8Click

{******************************************************************************
Button7Click
******************************************************************************}
procedure TfrmRamRod.Button7Click(Sender: TObject);
begin // Button7Click
// Comedy 1
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 08;
rgrpMinutes.ItemIndex := 0;
end
else begin
rgrpHours.ItemIndex := 19;
rgrpMinutes.ItemIndex := 0;
end;

end; // Button7Click

{******************************************************************************
Button9Click
******************************************************************************}
procedure TfrmRamRod.Button9Click(Sender: TObject);
begin // Button9Click
// Comedy 3
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 12;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 19;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button9Click

{******************************************************************************
Button10Click
******************************************************************************}
procedure TfrmRamRod.Button10Click(Sender: TObject);
begin // Button10Click
// Comedy 4
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 14;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 6;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button10Click

{******************************************************************************
Button11Click
******************************************************************************}
procedure TfrmRamRod.Button11Click(Sender: TObject);
begin // Button11Click
// Comedy 5
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 22;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 3;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button11Click

{******************************************************************************
Button12Click
******************************************************************************}
procedure TfrmRamRod.Button12Click(Sender: TObject);
begin // Button12Click
// Comedy 6
if (not xboxSecond.Checked)
then begin
rgrpHours.ItemIndex := 23;
rgrpMinutes.ItemIndex := 2;
end
else begin
rgrpHours.ItemIndex := 4;
rgrpMinutes.ItemIndex := 2;
end;
end; // Button12Click

end.
[/delphi]

Add a Comment

Your email address will not be published. Required fields are marked *