Code: Select all
$If (APanel.Visible)
%Items = "";
%Path = APanel.Path;
$If(%Path == "")
%Items = APanel.Path0 + "\n";
%FileName = FSplit(APanel.HostFile, FSPLIT_NAME) + FSplit(APanel.HostFile, FSPLIT_EXT);
$Else
%FileName = FSplit(APanel.Path, FSPLIT_NAME) + FSplit(APanel.Path, FSPLIT_EXT);
%I = RIndex(%Path, "\\");
$While (%I >= 0)
%Path = Substr(%Path, 0, %I);
%Items = %Items + %Path + "\\\n";
%I = RIndex(%Path, "\\");
$End
$End
%InitDiskItems = "\1 Disks\n";
%Items = %Items + %InitDiskItems;
%I = 65;
$While (%I <= 90)
$If (FExist(Chr(%I) + ":"))
%Items = %Items + "&" + Chr(%I) + ":\\\n";
$End
%I = %I + 1;
$End
$If (%Items != ("\n" + %InitDiskItems))
%Path = Menu.Show(%Items, "Go to ...", 0x290);
$If (%Path != "")
%LfPos = Index(%Path, "\n");
$If(%LfPos >= 0)
%APath = Substr(%Path, 0, %LfPos);
$If(Substr(%APath, 0, 1) == "&")
%APath = Substr(%APath, 1);
$End
Panel.SetPath(0, %APath, %FileName);
%PPath = Substr(%Path, %LfPos + 1);
%LfPos = Index(%PPath, "\n");
$If(%LfPos >= 0)
%PPath = Substr(%PPath, 0, %LfPos);
$If(Substr(%PPath, 0, 1) == "&")
%PPath = Substr(%PPath, 1);
$End
Panel.SetPath(1, %PPath, %FileName);
$End
$Else
$If(Substr(%Path, 0, 1) == "&")
%Path = Substr(%Path, 1);
$End
Panel.SetPath(0, %Path, %FileName);
$End
$End
$End
$End