[fpc-pascal] Adding command line parameter to GUI application?
Bo Berglund
bo.berglund at gmail.com
Tue Feb 25 21:28:13 CET 2025
I have created a Video Player application to be used in order to create the
ffmpeg command to edit a video file according to cut points evaluated inside the
program. I have used the PasLibVLC library for the video handling.
But I have found that it is also useful as a regular video player where I have
added useful functions also good for viewing.
The application loads paramaters from an ini file on start where for instance
the default form size video step values and last used video file etc are read
from the ini file.
Now I want to use this application as a regular video player too, i.e. I want to
be able to click on a video file in Windows File Explorer and start my
application with the video file name as a command line paramater.
How can this be done with my application not intended from the start to be used
this way?
And how can I register it as a possible Video player such that it will be shown
in the list of apps to play a selected video file?
The current start state is a form with some edit controls and a display area
where control values are read from the ini file but once populated the
application waits for user input.
I want the program to load a video file if it appears in the command line so it
can be immediately played rather than having to click the OpenFile button and
navigate to the video and select it.
Any ideas, suggestions, links?
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list