Darkkobold
asked on
DOS style Commands?
This is somewhat of a 2 part question:
First, I want to run a shell command, like
"C:\program files\winamp\winamp.exe /ADD Some.Mp3"
Is there a simple 1 - 2 step to do that?
Also, when I do find first, find next, the list comes up in non-alphabetical order. Can I fix that with out making an array sort func?
Thanx for the help all!
First, I want to run a shell command, like
"C:\program files\winamp\winamp.exe /ADD Some.Mp3"
Is there a simple 1 - 2 step to do that?
Also, when I do find first, find next, the list comes up in non-alphabetical order. Can I fix that with out making an array sort func?
Thanx for the help all!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Motaz - About to give you more points- Thank you for the help - If you could tho, what are all those params you pass to
ShellExecute(0, 'open', 'C:\program files\winamp\winamp.exe', 'exe /ADD Some.Mp3', nil, sw_Normal);
ShellExecute(0, 'open', 'C:\program files\winamp\winamp.exe', 'exe /ADD Some.Mp3', nil, sw_Normal);
This is an example of how to sort the list:
procedure TForm1.Button1Click(Sender
var
Rec: TSearchRec;
begin
FindFirst('c:\*.*', faAnyFile, Rec);
repeat
ListBox1.Items.Add(Rec.Nam
until FindNext(Rec) <> 0;
FindClose(Rec);
ListBox1.Sorted:= True;
end;
You can use TStringList instead of ListBox
Motaz