PSN jschut_82 | Xbox: JSchut82
Op tweakers vind je wel een link. Kwestie van zoeken:
[topic=34527/1/25]
Maar Winamp kan dit ook hoor.
[topic=34527/1/25]
Maar Winamp kan dit ook hoor.
Lekker woordenboek, als je niet eens weet dat vandalen met een 'n' is.
ok dank je dat is gelukt maar nu moet ik echt een hardeschijf selecteren ik kan dus alleen maar bijv C:\ zeggen
kan het ook op een manier dat je alle hd's doorzoekt
kan het ook op een manier dat je alle hd's doorzoekt
PSN jschut_82 | Xbox: JSchut82
1 voor 1 alle drives afgaan ?
der zullen vast wel functies zijn die controleren of een drive wel of niet bestaat en of het een removable device is
der zullen vast wel functies zijn die controleren of een drive wel of niet bestaat en of het een removable device is
Ja hoor, open een zoekscherm in windows (F3), zoek naar *.mp3 en sleep alle resultaten naar winamp.
Lekker woordenboek, als je niet eens weet dat vandalen met een 'n' is.
Op vrijdag 05 april 2002 09:51 schreef JSchut het volgende:
ik ben bezig met een proggie dat alle mp3's op je harde schijf opzoekt en dat je ze dan ineen lijst zet en ze af kan spelen.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
| type
TNewDriveNumber = 0..25;
TNewDriveSet = set of TNewDriveNumber;
function SearchFile(StartDir: String; S: String): String;
var DirInfo : TSearchRec;
TempRes : String;
Tmperror: Longint;
begin
{-- initialize some variables ---------------------------------------------}
SearchFile := '';
TempRes := '';
{-- make sure the screen is updated ---------------------------------------}
Application.ProcessMessages;
{-- go for a cheap success if possible ------------------------------------}
TmpError := FindFirst(StartDir+S, faAnyFile, DirInfo);
If TmpError = 0 then
TempRes := StartDir + DirInfo.Name;
SysUtils.FindClose(Dirinfo);
If TempRes<>'' then
begin
SearchFile := Tempres;
EXIT;
end; { found }
{-- go search everything --------------------------------------------------}
TmpError := FindFirst(StartDir+'*.*', faAnyFile, DirInfo);
While TmpError=00 do
begin
If ((DirInfo.Attr AND faDirectory) <> 0) AND
(DirInfo.Name <> '.') AND (DirInfo.Name <> '..') then
begin
TempRes := SearchFile(StartDir + DirInfo.Name + '\', S);
If TempRes <> '' then Break;
end; { Directory }
TmpError := FindNext(DirInfo);
end; { While }
FindClose(Dirinfo);
{-- and return our result -------------------------------------------------}
SearchFile := TempRes;
end; { func. SearchFile }
function SearchDrivesFor(var FName: String; var UpdLabel: TLabel): Boolean;
var DriveBits: TNewDriveSet;
Counter : Longint;
Tmp : Longint;
TmpStr : String;
begin
{-- initialize variables ---------------------------------------------------}
SearchDrivesFor := FALSE;
{-- build a list with all actice drives ------------------------------------}
Longint(DriveBits) := GetLogicalDrives;
{-- first count the number of drives we expect -----------------------------}
Tmp := 0;
for Counter := 2 to 25 do { start at C:-drive }
if Counter in DriveBits then
begin
Inc(Tmp);
end; { if }
IntroForm.ProgressBar1.Position := 0;
IntroForm.ProgressBar1.Max := Tmp;
Tmp := 0;
{-- now loop through all drives, update the label and search it ------------}
for Counter := 2 to 25 do
if Counter in DriveBits then
begin
{-- Update some labels -----------------------------------------------}
UpdLabel.Caption := Format('Searching in "%s:\"', [Chr(Counter + 65)]);
Application.ProcessMessages;
{-- actually look for the file ---------------------------------------}
TmpStr := SearchFile(Chr(Counter + 65) + ':\', FName);
if TmpStr <> '' then
begin
{-- set the result -----------------------------------------------}
SearchDrivesFor := TRUE;
FName := TmpStr;
{-- and set the progress bar to succeed --------------------------}
IntroForm.ProgressBar1.Position := IntroForm.ProgressBar1.Max;
{-- and exit this loop -------------------------------------------}
EXIT;
end; { if }
{-- update the progressbar -------------------------------------------}
Inc(Tmp);
IntroForm.ProgressBar1.Position := Tmp;
end; { for }
end; { proc. SearchDrivesFor } |
Pagina: 1