SCAR Code:
var
frmDesign : TForm;
ListBox1 : TListBox;
Button1 : TButton;
procedure ListClicked(Sender : TObject);
begin
WriteLn(IntToStr(ListBox1.ItemIndex));
end;
procedure initform;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.BorderStyle := bsSingle;
frmDesign.Caption := 'frmDesign';
frmDesign.ClientHeight := 203;
frmDesign.ClientWidth := 163;
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.PixelsPerInch := 96;
ListBox1 := TListBox.Create(frmDesign);
ListBox1.Parent := frmDesign;
ListBox1.Left := 8;
ListBox1.Top := 8;
ListBox1.Width := 104;
ListBox1.Height := 176;
ListBox1.ItemHeight := 13;
ListBox1.OnClick := @ListClicked;
ListBox1.Items.Add('sel1');
ListBox1.Items.Add('sel2');
ListBox1.Items.Add('sel3');
ListBox1.Items.Add('sel4');
ListBox1.Items.Add('sel5');
ListBox1.TabOrder := 8;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 120;
Button1.Top := 8;
Button1.Width := 25;
Button1.Height := 176;
Button1.ModalResult := 1;
Button1.TabOrder := 9;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SafeInitForm;
SafeShowFormModal;
end.
You see the ListBox1.ItemIndex? That tells the script what index the list is at, so in your case F2P Path = index 0 and P2P Path = index 1
E:
SCAR Code:
ListBox1.OnClick := @ListClicked;
Is important! In the procedure ListClicked; you'll have to put everything for loading the stuff you want to load and so on 
E2: It is also possible to make the script so that it loads the stuff when a button is clicked
Good luck