I want to create a universal script in order to generate PDFs out of DxDesigner. I would like to give the script an argument, whether the PDF is black or color.
I use following script to read out the argument:
Set WshShell = WScript.CreateObject ("WScript.Shell") Set Ag = Wscript.Arguments if Ag.count < 1 Then WScript.Quit End if color = Ag.item(0) msgbox "the PDF will be printed in" & color WScript.Quit
However if I try to call the script via "run ...vbs black" I get an error message:
Source:'Laufzeitfehler in Microsoft VBScript'
Error:0x800a01a8 'Objekt erforderlich: 'WScript''
What am I doing wrong?