0

I made an mp3 player in Delphi.

I set it up to register it's playlist file type. Now when you double click on a playlist in explorer it opens my player, like it should.

How do I find out what file they clicked on to process?

Google was useless for me since I wasn't sure what to search for.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by eenceo
0

Its full path is given as the first command-line argument. So you will want to add code to check to see if an mp3 file was supplied and autoplay it. How exactly you do it is up to you, but I recommend you read the documentation for TApplication.Initialize.

The following is an example, assuming you have an object named 'MyPlayer' with a method 'PlayFile', etc.

if ParamCount > 0
  then MyPlayer.PlayFile( ParamStr( 1 ) );

Hope this helps.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.