{"id":622,"date":"2012-11-27T10:03:53","date_gmt":"2012-11-27T10:03:53","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=622"},"modified":"2013-03-01T14:42:37","modified_gmt":"2013-03-01T14:42:37","slug":"vbscripting-example","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/vbscripting-example\/","title":{"rendered":"VBScripting Example"},"content":{"rendered":"<p>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 &#8220;Run as Administrator&#8221;.<\/p>\n<p>myscript.vbs<\/p>\n<pre>Dim input, output\r\nIf WScript.Arguments.Count &lt;&gt; 2 Then\r\n   MsgBox(\"Usage myscript.vbs input_image output_text\")\r\n   WScript.Quit\r\nEnd If\r\nSet oBarcode = CreateObject(\"SoftekATL.Barcode\")\r\nSet oArgs = WScript.Arguments.Unnamed \r\ninput = oArgs.Item(0)\r\noutput = oArgs.Item(1)\r\noBarcode.ScanBarCode(input)\r\nn = oBarcode.BarCodeCount\r\nSet fso = CreateObject(\"Scripting.FileSystemObject\")\r\nSet f = fso.CreateTextFile(output)\r\nIf n &gt; 0 Then\r\n   f.WriteLine(oBarcode.barstring(1))\r\nEnd If<\/pre>\n<p>On most systems the above script could be called as follows:<\/p>\n<p>myscript.vbs &lt;input image&gt; &lt;output text&gt;<\/p>\n<p>Example:<\/p>\n<p>myscript.vbs input.tif output.txt<\/p>\n<p>Note that the above script is only an example and is not part of our supported toolkit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;Run as Administrator&#8221;. myscript.vbs Dim &hellip; <\/p>\n","protected":false},"author":1,"featured_media":322,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[19,66,146,131,62,145,57],"class_list":["post-622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development-kits","tag-barcode","tag-development","tag-example","tag-reader","tag-software","tag-vbscript","tag-visual-basic"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/622"}],"collection":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":3,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/622\/revisions\/624"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media\/322"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}