AnsweredAssumed Answered

DxDesigner 7.9.2: Using a script with arguments

Question asked by markus.reich on Jan 16, 2012
Latest reply on Jan 16, 2012 by a.sassano

Hello,

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'

Line:1  Char:0

Error:0x800a01a8  'Objekt erforderlich: 'WScript''

 

What am I doing wrong?

Outcomes