4 Replies Latest reply on Sep 18, 2017 7:16 AM by Darryn Campbell

    MK500 Auto Trigger in PocketBrowser

    John Reisinger

      Hi Everyone!

      I am trying to set up an MK500 laser-based micro kiosk with PocketBrowser.

      I have found how to set an imager-based MK500 to presentation mode, but I can't see how to set the auto trigger for the laser scanner.

      Is it possible to set the auto trigger through PocketBrowser, or will I need to use a custom-written application or datawedge?

       

      Thanks,

      --John

        • Re: MK500 Auto Trigger in PocketBrowser
          Darryn Campbell

          Hi John,

           

          There is a code snippet in the PocketBrowser 3.1 help file for this (and earlier, I think it was introduced in 2.21):

           

          The documentation is not online so I'll copy it here:

           

          <HTML>

          <HEAD>

            <Meta http-equiv="scanner" content="aimtype:presentation">

            <Meta http-equiv="scanner" content="DecodeEvent:url('Javascript:doScan('%s');')">

            <Meta http-equiv="scanner" content="enabled">

          </HEAD>

          <BODY onLoad="doSoftScan();">

            <SCRIPT LANGAUGE="JavaScript">

              var Generic = new ActiveXObject("PocketBrowser.Generic");

           

           

              function doSoftScan()

              {

             Generic.InvokeMetaFunction('scanner', 'start');

              }

           

           

              function doScan(data)

              {

             bcode.innerHTML = data;

             doSoftScan();

          }

            </SCRIPT>

            <div id="bcode"></div>

          </BODY>

          </HTML>

            • Re: MK500 Auto Trigger in PocketBrowser
              John Reisinger

              Thanks for that Darryn.

              I have tried that code and I cannot get it working. I am using PocketBrowser 3.1.0.1 .

              I have also tried DataWedge 3.3, set it to presentation mode, and it will not work either.

              I am able to make the scanner work with the following code, which retriggers the scanner every 3 seconds in trigger mode, but it is a bit of a kludge -

               

              <html>

              <head>

              <META HTTP-Equiv="scanner" Content="enabled">

              <META HTTP-Equiv="scanner" Content="DecodeEvent:url('javascript:doScan('%s', '%s', %s, '%s', %s);')">

              <META HTTP-Equiv="quitbutton" Content="left:200;top:0;visibility:visible">

              </head>

              <body onLoad="doSoftScan(); setInterval(doSoftScan, 3000);">

              <SCRIPT LANGAUGE="JavaScript">

              var Generic = new ActiveXObject("PocketBrowser.Generic");

              function doSoftScan()

              {

              Generic.InvokeMetaFunction('scanner', 'start');

              }

              </SCRIPT>

              </body>

              </html>

               

              Am I missing something in the config of the unit? Do I need newer software? Is it possible my MK500 units do not have the required sensors for presentation mode?

               

              Thanks,

              --John