bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

VBScripting Example

admin November 27, 2012 Software Development Kits No Comments

The following VBScript shows how to create a tool that will read the value of a barcode from an image and write the value to a text file. Make sure that SofteATL.dll has been registered before attempting to run. This can be done by right clicking on REGISTER.BAT and selecting “Run as Administrator”.

myscript.vbs

Dim input, output
If WScript.Arguments.Count <> 2 Then
   MsgBox("Usage myscript.vbs input_image output_text")
   WScript.Quit
End If
Set oBarcode = CreateObject("SoftekATL.Barcode")
Set oArgs = WScript.Arguments.Unnamed 
input = oArgs.Item(0)
output = oArgs.Item(1)
oBarcode.ScanBarCode(input)
n = oBarcode.BarCodeCount
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile(output)
If n > 0 Then
   f.WriteLine(oBarcode.barstring(1))
End If

On most systems the above script could be called as follows:

myscript.vbs <input image> <output text>

Example:

myscript.vbs input.tif output.txt

Note that the above script is only an example and is not part of our supported toolkit.

← Image resolution and barcode reading
Reading PDF-417 barcodes from scanned images →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved