Recent Changes - Search:

Products

General resources

   Android
   DataEdit

edit SideBar

Android / DataEdit :
By - May 09, 2019, at 04:47 PM

About DataEdit


In MT90 and MT65 there is a feature that you can load a javascript file to edit scan result.
We also provide an online page where you can edit javascript directly.Please click here.

How to load script file
①Touch【Quick Setting】icon


②Touch 【Scan Setting】button


③Touch 【data edit】button


④Check【exec script】checkbox on and touch【load script】button


⑤Select the script file that you want to execute


⑥Touch 【OK】button


⑦Touch【Test】tab


⑧Scan the barcode


How to edit script file
What you need to do is create a js script file and overwrite the JSDataFormat method.
The JSDataFormat method contains the following five parameters and you can use these parameters to program .Notice that you should not change the method name.

【Pramaters】


【Return value】 You need to return an Hexadecimal value array as return value.

Code Example:
Here are some example for the javascript
You can see there are "Changeable Area" and "Unchangeable Area" surrended by code comments in the js file.
"Changeable Area" always from the second line of js file.This area means that customer can change the paramater between '=' and ';' mark then they can run the js file directly.
"Unchangeable Area" means area which customer should not change ,unless customer want to change the function of this js file.

Example of cropping the decoded result.
In this example it crop the first character of the QR Code then output
Download JS file.


Example of replace a character from decoded result.
In this example it replace the QR Code's digit 1 with '*' mark
Download JS file.


Example of insert a character into decoded result.
In this example it insert an enter key in front of the QR Code then output.
Download JS file.


Example of show all paramaters.
In this example it show all paramaters like the format of code name:decode result:aimid
Download JS file.


Edit - History - Print - Recent Changes - Search