What is a script in Open Bee™ Scan Capture ?
You can write javascript code within Open Bee™ Scan Capture. This code is called a script within software. This script allows you to infer a value from other information captured on the document, transform a value into a very particular format, assemble multiple values from the document, or even create your own output.
The different contexts
Scripts can be used in different parts of the application, these parts are referred to as context within this documentation.
The context in which the script is launched determines which variables or functions can be used within it. For more information on the variables that can be used per context, we recommend that you read the page dedicated to objects
There are 4 Open Bee™ Scan Capture, each of which will be represented by a box with a specific color throughout the documentation:
- WORD: It is possible to construct an accounting entry label using a script, for more information on how to activate this feature please go to the page provided for this purpose.
- INDEX: When an index is configured for manual entry, it is possible to create a script to get its value. In the case of a drop-down index, it is also possible to populate the values of this list by using a JSE_Result object within your script
- VALIDATION: Several types of validation are available in Open Bee™ Scan Capture, if scripted validation is enabled in your tools.conf file you can build a script that defines the actions to be performed each time the document is validated in the videocoding part of the application
- WRITINGS: In the same way as document validation, you can export your entries using a script, if your accounting export has been configured for this. Your write batch will then be exported following the actions defined in the export script. Be careful the script will be executed once per write, so in case your batch contains X writes, the script will be executed X times.
Regardless of the context used, the script is always executed by the Open Bee™ Scan Capture console
Learn Javascript
Javascript is a widely used programming language and can be used to carry out complex projects (dynamic websites, mobile applications, etc.). In Open Bee™ Scan Capture, it is encapsulated in a minimal environment, only the basics of the language are available (loops, conditions, arrays, etc.), as well as pre-integrated variables, and functions specific to Open Bee™ Scan Capture.
It is not possible to load external libraries or directly access the graphical elements of the application.
If you are not familiar with the basics of javascript, there are many courses available on the internet:
- https://www.grafikart.fr/formations/debuter-javascript
- https://openclassrooms.com/fr/courses/2984401-apprenez-a-coder-avec-javascript
- https://javascript.developpez.com/cours/