{"id":1512,"date":"2013-06-25T03:01:14","date_gmt":"2013-06-25T03:01:14","guid":{"rendered":"http:\/\/www.gssezisoft.com\/main\/?p=1512"},"modified":"2013-06-26T22:03:26","modified_gmt":"2013-06-26T22:03:26","slug":"using-a-batch-file-to-pick-the-twain-source","status":"publish","type":"post","link":"http:\/\/www.gssezisoft.com\/main\/2013\/06\/using-a-batch-file-to-pick-the-twain-source\/","title":{"rendered":"Using a Batch File to Pick the TWAIN Source"},"content":{"rendered":"<p>Here is a simple way to pick the TWAIN source device. It uses a four line batch file.<br \/>\n<!--more--><br \/>\n<a href=\"http:\/\/www.gssezisoft.com\/main\/wp-content\/uploads\/2013\/06\/set-twain-source-batch-file.png\"><img loading=\"lazy\" src=\"http:\/\/www.gssezisoft.com\/main\/wp-content\/uploads\/2013\/06\/set-twain-source-batch-file.png\" alt=\"set-twain-source-batch-file\" width=\"690\" height=\"360\" class=\"alignnone size-full wp-image-1513\" srcset=\"http:\/\/www.gssezisoft.com\/main\/wp-content\/uploads\/2013\/06\/set-twain-source-batch-file.png 690w, http:\/\/www.gssezisoft.com\/main\/wp-content\/uploads\/2013\/06\/set-twain-source-batch-file-150x78.png 150w, http:\/\/www.gssezisoft.com\/main\/wp-content\/uploads\/2013\/06\/set-twain-source-batch-file-300x156.png 300w\" sizes=\"(max-width: 690px) 100vw, 690px\" \/><\/a><\/p>\n<h2>The Batch File<\/h2>\n<p>The batch file actually calls a DLL to bring up the &#8220;Select Source&#8221; dialog box. You do have to have a copy of <a href=\"http:\/\/www.gssezisoft.com\/main\/product\/cmdtwain\/\" title=\"CmdTwain\">CmdTwain<\/a> as it has the DLL you need.<br \/>\n<code><br \/>\n@echo on<br \/>\nTitle TwainSelect<br \/>\ncd \"C:\\Program Files\\GssEziSoft\\CmdTwain\"<br \/>\nRunDLL32 EZTW32.DLL,TWAIN_SelectImageSource<br \/>\n<\/code><\/p>\n<p>Feel free to set &#8220;@echo off&#8221; if you use it in a production environment.<\/p>\n<p>Of course, if you already have CmdTwain 1.01 or later, you can just use &#8220;CmdTwain \/SOURCE&#8221; instead of calling the Dynamic Link Library directly. The &#8220;\/SOURCE&#8221; option wasn&#8217;t available in earlier versions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a simple way to pick the TWAIN source device. It uses a four line batch file.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,40],"tags":[],"_links":{"self":[{"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/posts\/1512"}],"collection":[{"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/comments?post=1512"}],"version-history":[{"count":0,"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/posts\/1512\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/media?parent=1512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/categories?post=1512"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gssezisoft.com\/main\/wp-json\/wp\/v2\/tags?post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}