ByteScout BarCode Generator SDK – VBScript – Command Line Use

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – VBScript – Command Line Use

ByteScout BarCode Generator SDK – VBScript – Command Line Use

GenerateQRCode.vbs

if WScript.Arguments.Count < 1 Then
    WScript.Echo "Set barcode value as command line parameter: " & vbCRLF & vbCRLF & "GenerateQRCode.vbs <value>"
    WScript.Quit 0
End If

' Create and activate QRCode instance
Set barcode = CreateObject("Bytescout.BarCode.Barcode")
barcode.RegistrationName = "demo"
barcode.RegistrationKey = "demo"

' Set barcode type
barcode.Symbology = 16 ' 16 = QRCode symbology

' Set barcode value from the command line parameter
barcode.Value = WScript.Arguments(0)

' Save barcode image to file
barcode.SaveImage("result.png")

Set barcode = Nothing

run.bat

REM running from the command line
cscript.exe GenerateQRCode.vbs "ABCDEFGHIJKLMNOP1234567890"
pause

  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next