In Vbscript, How could I use a variable number of arguments ? (In IM v 6.9.9)
Code: Select all
'Declare my arguments
Dim arg(1)
arg(0) = "c:\Source.jpg"
arg(1) = "c:\Destination.jpg"
'The following works, but I have to know the number of arguments, they will never be the same in my program
Set ImgObj = CreateObject("ImageMagickObject.MagickImage.1")
ImgObj.Convert( arg(0), arg(1) )
Set ImgObj = Nothing
'The following does not work : IM does not like to receive an Array as argument
Set ImgObj = CreateObject("ImageMagickObject.MagickImage.1")
ImgObj.Convert( arg )
Set ImgObj = Nothing