Multi Commander > Support and Feedback
Call ImageMagick to convert file format
(1/1)
dennys:
Hi, I try to add a custom context menu to call ImageMagick to convert file format.
1. I try to call ImageMagick directly and it works (because ImageMagick shows lots of help, I can see it), and this is my script
MC.Run CMD="D:\ImageMagick\convert.exe"
2. I try to add parameters to generate a command like this "D:\ImageMagick\convert.exe filename.jpg filename.webp", but it doesn't work.
MC.Run CMD="D:\ImageMagick\convert.exe" ARG="${sourcefocusname} PathGetNamePart( ${sourcefocusname}, 1).webp ";
And I try to change the log level of the application log to debug / Full, but it doesn't show anything.
Can you advice how to debug?
Jungle:
2. Menu Help > MultiScript debugger...
1. I'm almost sure that PathGetNamePart( ${sourcefocusname}, 1).webp will not work inside ARG="...". I think you would need to write something like
--- Code: ---@var $path = GetSourceFocusPath();
@var $new_name = GetSourcePath() ^ PathGetNamePart( $path, 1 ) + ".webp";
MC.Run CMD="D:\ImageMagick\convert.exe" ARG="${focusfilepath} ${new_name}";
--- End code ---
Navigation
[0] Message Index
Go to full version