Get Barcode

Verb: getBarcode

Available from: <Enterprise>

Gets one or more barcodes from an image or a PDF file.

Syntax

getBarcode --sourcetype(BarcodeSourceType) --image(Image) --pdf(Pdf) --pdfpage(Numeric) [--codepositionfrom(Boolean)] --codeposition(Numeric) --format(Nullable<BarcodeFormat>) [--retry(Boolean)] --step(Numeric) --max(Numeric) (DataTable)=table (String)=code (String)=type (Boolean)=success

Inputs

Script Designer Required AcceptedTypes Description
--sourcetype Source Required BarcodeSourceType Type of the file where the barcodes are. Options:
  • Image
  • Pdf
  • --image Image Only whenSource is Image Image, Text Image file containing barcodes.
    --pdf Pdf Only whenSource is Pdf PDF, Text PDF file containing barcodes.
    --pdfpage Page to be read Only whenSource is Pdf Number Page number of the PDF file containing the barcode.
    --codepositionfrom Barcode position Optional Boolean When enabled, allows choosing the barcode position according to the order in which the codes are arranged in the file.
    --codeposition Barcode position order Only whenBarcode position is True Number Position where the barcode is at.
    --format Format Required BarcodeFormat Barcode Type.
    --retry Retry Optional Boolean When enabled, repeats the command execution if the barcode is not obtained on the first try.
    --step Step Only whenRetry is True Number The zoom percentage applied to the barcode on each attempt.
    --max Max zoom Only whenRetry is True Number The maximum zoom that can be applied after retries.
    --fromfile Get from file(Obsolete) Optional Boolean When enabled, defines that a file will provide the barcode.
    This parameter is obsolete, use the Source parameter instead.
    --imagepath Image path(Obsolete) Only whenGet from file is True Text Image path of the file that contains the barcode.
    This parameter is obsolete, use the Source parameter instead.
    --frompdf Get from PDF(Obsolete) Optional Boolean When enabled, defines that the a PDF file will provide the barcode.

    Outputs

    Script Designer AcceptedTypes Description
    table List of codes and types Data Table Returns a list of the value of each barcode and its types.
    code Code of image Text Returns the barcode obtained according to position.
    type Type of barcode Text Returns the barcode type obtained according to position.
    success Success Boolean Returns "True" if the execution got the barcode, or "False" if it didn't.

    Example

    The Get Barcode command gets barcodes according to the type defined in the Format parameter.

    defVar --name codes --type DataTable
    defVar --name imageCode --type String
    defVar --name codeType --type String
    defVar --name success --type Boolean
    //Download the file below to test the script.
    getBarcode --sourcetype "Image" --image "QRCodeImage.png" --format "QR_CODE" imageCode=code codeType=type codes=table success=success
    //Displays in the console the value of each barcode obtained and its type.
    logMessage --message "\r\n${codes}\r\n${imageCode}\r\n${success}\r\n${codeType}" --type "Info"
    

    Download File

    To execute the script above, you need to download the file and insert the path to where it was saved, in the Image parameter.

    Remarks

    The value inserted in the Step parameter, added to the already existing zoom at the first command execution, must be less than the value entered in the Max zoom parameter.

    See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Click on Value
  • Close Window
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • Find Window
  • Find Windows
  • Focus
  • Focus Window
  • Get Bounds
  • Get Cell Value
  • Get Control
  • Get Image Grid
  • Get Interval
  • Get Options
  • Get Table
  • Get Table Information
  • Get Tree Nodes
  • Get Value
  • Handle Open File Dialog
  • Handle Save File Dialog
  • Launch and Attach Window
  • Launch or Attach Window
  • Map Image Grid
  • Maximize or Minimize Window
  • Offset Value
  • Screenshot Window
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • Update Window
  • Verify Enabled
  • Verify If Visible
  • Wait and Close Security Window
  • Wait Busy Window
  • Wait Control
  • Wait for Control to Enable
  • Wait for Window to Appear
  • Watch and Close Window