저기 아래 답변이 winexec함수를 사용 했더군요.. 전 shellexecute함수 쓰거든요..
파라미터까지 실행시키기 위해...
제가 지금 통합연주기 만드걸랑요.... 히
그냥 제가 부분 소스 보여 드릴테니 수정을..
procedure TForm1.Button4Click(Sender: TObject);
label here;
var
dir1, dir2, dir3 : array[0..75] of char;
a, b, pdir : string;
i : integer;
k : THandle;
begin
getdir(0, pdir);
i:=0;
here:
label2.caption:=inttostr(i);
for i:=i to listbox1.items.count-1 do
begin
a:=listbox1.items.strings[i];
b:=copy(a, pos('.', a)+1, length(a)-pos('.', a));
{var
InstanceID : THandle;
begin
InstanceID := WinExec(파일이름,1);
repeat
Application.ProcessMessages;
until Application.Terminated or (GetModuleUsage(InstanceID) = 0);
end;}
if (b='ra') or (b='rm') or (b='RA') or (b='RM') then
{begin}
k:=shellexecute(handle, nil, strpcopy(dir1, 'rvplayer.exe'),
strpcopy(dir2, listbox2.items.strings[i]),
strpcopy(dir3, pdir), sw_show);
repeat
Application.ProcessMessages;
until Application.Terminated or (GetModuleUsage(k) = 0);
{i:=i+1;
goto here;}
{end;}
if (b='mp3') or (b='MP3') then
{begin}
k:=shellexecute(handle, nil, strpcopy(dir1, 'winplay3.exe'),
strpcopy(dir2, listbox2.items.strings[i]),
strpcopy(dir3, pdir), sw_show);
repeat
Application.ProcessMessages;
until Application.Terminated or (GetModuleUsage(k) = 0);
{i:=i+1;
goto here;}
{end;}
if (b='wav') or (b='WAV') then
{begin}
mediaplayer1.filename:=listbox2.items.strings[i];
mediaplayer1.open;
mediaplayer1.play;
repeat
Application.ProcessMessages;
until Application.Terminated or (GetModuleUsage(k) = 0);
{i:=i+1;
goto here;}
{end;}
end;
end;
지저분 하죠 히~~~
|