Ran an user-defined func on multi-selected files in series

Greetings,
I defined an used-defined command named Convert2ISO. Then I defined the following button:

@nofilenamequoting @filesonly @keydown:none @set strDesPath = "{d}" @set strFilenameExt="{f!|ext}" @set strFilenameSrcWithPath="{f!}" @set strFilenameNoExt="{o!|noext}" dopusrt /cmd Convert2ISO {$strDesPath} {$strFilenameExt} {$strFilenameSrcWithPath} {$strFilenameNoExt}

When only a file is selected, everything will work excellent, but when multi-files are selected, just the first file is sent to the function. Is this a bug of DOpus or my code is wrong?

If I delete dopusrt /cmd of my code, DOpus will open a progress window , the first selected file is converted and the progress window will stay opened for always!

That seems over-complicated. I think this will do the same thing:

@filesonly Convert2ISO {d} {f!|ext} {f!} {o!|noext}

Does that work?

If not, what is the definition of Convert2ISO?

[quote="leo"]That seems over-complicated. I think this will do the same thing:

@filesonly Convert2ISO {d} {f!|ext} {f!} {o!|noext}

Does that work?

If not, what is the definition of Convert2ISO?[/quote]

Thank to reply. Unfortunately no!. The behavior is exactly the same as when dopusrt /cmd is missed.

The function code is as follow:

[code]@script vbscript
Option Explicit
Dim strDOpusrt
strDOpusrt = "C:\Program Files\GPSoftware\Directory Opus\DOpusrt.exe"
Dim strUltraISO
strUltraISO = "C:\UltraISO\UltraISO.exe"
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Dim strFileNameWithPath
Dim strFileNameWithoutPath
Dim strDestPath
Dim strFileExt
Dim command
Dim Return
strDestPath = UCase("&strDest&")
strFileExt = LCase("&strFExt&")
strFileNameWithPath = LCase("&strFwithPath&")
strFileNameWithoutPath = LCase("&strFwithoutPath&")
if strFileExt = ".rdf" or strFileExt = ".nrg" or strFileExt = ".mdf" or strFileExt = ".cue" or strFileExt = ".bin" or strFileExt = ".ccd" or strFileExt = ".dmg" or strFileExt = ".img" or strFileExt = ".uif" or strFileExt = ".xmf" or strFileExt = ".vcd" then

   'Convert selected image
   command = """" & strUltraISO & """" & " -bin2iso " & """" & strFileNameWithPath & """" & " -output " & """" & strDestPath & """"
   'MsgBox(command)
   Return = Shell.Run(command, ,true)

else if strFileNameWithPath = "" then

end if
end if
[/code]

I rewrote my function's code to be used in a separate VBS file and the problem solved. Problem is just when it is used such as an internal user-defined command.

@script is only meant to be used with rename scripts; it isn't intended for general-purpose buttons. (At least not yet.)

Thanks dear Leo.