Hello,
Unfortunately the HN command to launch a program/file cannot send parameters to the target.
However, a work-around is to create a simple batch file with HN and then use this to launch the target with necessary parameters.
Attached is a very basic project that converts a video using FFmpeg on Windows X64 - the download link is at the bottom of this post.
The project just has one button and one field.
The location of FFmpeg is hardcoded in the script, and the final video is called Video1.mkv
The video to be converted is selected via a dialog box.
Note, the video source path has " (quotation marks) appended around it, in case the full path contains spaces.
I didn't do this for the converted file path as it is just saved to the project directory.
Most of the code just displays information into field 1 as to aid debugging.
Also, FolderItemLaunch(fvar,1) executes the FFmpeg in the foreground to aid debugging.
Just use - FolderItemLaunch(fvar,0) to launch it in the background.
Local fname,fvar,fdetails,ftypes,fpaths,fnames,fextens
Local fhandle
Local sourcePath
Clear field 1
@ --- Get file ---
Put '--- Get file ---' after field 1
FileAskFilter(fname,'',fhandle,fdetails,ftypes,fpaths,fnames,fextens)
Put fname after field 1
Put line 9 of fdetails into sourcePath
Put sourcePath after field 1
@ --- Create batch file ---
Local batchname
Put ' ' after field 1
Put '--- Create batch file ---' after field 1
Put MyDirectoryFN into batchname
Append FolderSeparatorFN onto batchname
Append 'mybatch.bat' onto batchname
Put batchname after field 1
OpenTWriteAbs(batchname,fvar)
@ --- Build batch file ---
Local commandLine
Put ' ' after field 1
Put '--- Build batch file ---' after field 1
WriteTLine(fvar, 'ECHO OFF')
Put 'C:\ffmpeg-win64\bin\ffmpeg.exe -i ' into commandLine
Append '"' onto commandLine
Append sourcePath onto commandLine
Append '"' onto commandLine
Append ' -c copy ' onto commandLine
Append 'Video1.mkv ' onto commandLine
Put commandLine after field 1
WriteTLine(fvar,commandLine)
WriteTLine(fvar, 'PAUSE')
CloseTWrite(fvar)
@ --- Run batch file ---
Put ' ' after field 1
Put '--- Run batch file ---' after field 1
FolderItemGetAbs(batchname,fvar,fdetails,ftypes,fpaths,fnames,fextens)
FolderItemLaunch(fvar,1)
Put 'DONE' after field 1