Q:How do I get started?
A:Open the software, New File, Run
Then, open the software, New Project, Run ... Coding ... Run ……
Q:How to use multi-threaded function?
A:Multi-process, multi-process, multi-process !!!
Command tree, Commands, Work (Muiti-Thread), double-click Work_Create
Q:How do multiple processes communicate?
A:Use network, TCP / IP, or Redis.
Select Thread Project when creating a project to create a multi-process project that can access data to each other
It references the GlobalData extension library. This extension library has a global variable named G. This global variable is of type Redis. This is a database class used to access Redis. The main process and child processes are already connected when they are executed. To the same database.
The easiest way is to use Key_Set, Key_Get, accessing key-value pair data is very simple.
Q:Is there anything to note about multi-process development?
A:The code of the global code block will be executed in all processes (the main process and all child processes will run), and the Main function will only run in the main process. Functions that begin with Work_ are run after the child process starts at Work_Create.
Do not execute Work_Create in the global code block, otherwise it will fall into an infinite loop that cannot be ended, which is very scary, very, very scary.
Q:How to improve the English translation of LzBot?
A:Modify this file: setup\Language\en.json
Q:How do I add support for a new language?
A:
1. Add a new file in the setup\Language directory, such as cn.json
2. Modify "Language": "en" at the bottom of setup\option.json and replace en with your newly added file name (without extension)
3. Modify the json file. This file uses utf8 encoding and can directly support multiple languages.
4. If you still want to translate the command tree, find command.json in the setup directory, copy it to command_cn.json and edit this file (cn is replaced with your language file name)
5. Similarly, documents in the document.json and setup\Help, Modules\* directories can be created in this language
Q:How to add an extension library to LzBot?
A:LzBot does not yet have an online extension library source. I want to add this feature in the future, but it will take some time.
Extension libraries are now stored in the Modules directory. A folder is an extension library. The extension library requires at least three files: boot.tbs, command.json, and setup.json.
command.json is a list of commands displayed in the command tree, and is also responsible for automatically generating data for these functions.
setup.json is an extension library configuration file. You can configure which keywords and data types need to be highlighted, what are the dependent files of the extension library, and which other extension libraries does this extension library depend on (for example, GlobalData depends on Redis and RedisServer, and GlobalData Dependent extension libraries will also be introduced together)
boot.tbs is the source code of this extension library. The extension library that comes with ThinBasic may have only one line of code. For example File extension library, the code is: Uses "File"
Use Modules \ CommandEdit.exe to edit command.json of the extension library.
Q:Where is LzBot's website?
A:Unfortunately, due to lack of financial support, this project was developed by me and some enthusiasts. No one built and maintained the website.
Q:Is it open source?
A:I have such a plan, but before LzBot has taken shape, I can only invite a small number of people with sufficient strength to join the development group to ensure the quality of LzBot's code. In fact, the core code of this tool and many extension libraries are currently only me. Developed by one person.
Of course, I am willing to open source some of the extension libraries developed by myself for everyone to improve together. This part of the function is perfect, and ThinBasic can also benefit together.
Q:How is this part of the project implemented?
A:so easy, the file created first is in the front, the latter is created later, the top is the automatically generated version information, the public code is immediately behind (stored in setup \ boot.tbs), and the public code is followed by the extension library Dependent code, then the entire piece of code that all files are put together, and finally these codes will be run by ThinBasic.
Q:How to configure the project template?
A:so easy, Option.json is found in the template directory. Of course, the English version is Option_en.json. The same is true for other languages. You can see the list of project templates here. Note the MakeFile and MakeParam attributes of each project template. They point to an EXE file. After the project is created, , Will run this program, and this program will further fill the project information and default code, so theoretically it is easy to move all the templates in ThinAir, and the configuration is relatively free.
Q:How to add keywords automatically
A:command.json. This file is responsible for generating the number of commands, as well as auto-completion and hovering bubble tips. You can easily find this by opening it.
Q:What are Build.exe, Debug.exe, FileAssociation.exe, LogServer.exe, and Runner.exe in the bin directory?
A:Build.exe is responsible for translating tbs code into EXE (implemented by automatically controlling ThinBasic_Bundle_UI)
Debug.exe is responsible for debugging the running script (-D calls ThinBasic interpreter), and the temporary generated files will be deleted after the execution is completed
Runner.exe is responsible for running the script, and the temporary generated files will be deleted after the execution is completed
FileAssociation.exe is responsible for creating file associations
LogServer.exe is responsible for forwarding the debugging information issued by the script to the development environment to implement the function of TracePrint
Q:How did integrated help come about?
A:In this directory: setup\Help
Find the AiBot_Help JavaScript function.
LzBot encodes the Help field data of the corresponding entry in Command.json as json and sends it to this function, and then this function generates an HTML page and displays it.
Note the Temperature field of the Command.json entry, which is the name of the template file corresponding to the setup \ Help directory, so you can create your own integrated help.
Q:What version of ThinBasic does LzBot use now?
A:1.11.2.0
Q:What should I do if I encounter a problem?
A:I come here often, I can post here, and I will reply when I see it.
Q:Any helpful tips?
A:The SampleScripts_LzRPA directory has some code, of course, a lot of code is not perfect, and I will continue to enrich these codes in future releases.
Q:Is CommandEdit.exe available in English?
A:No, but source code: https://github.com/CN-xLeaves/LzRPA_CommandEdit
Maybe later versions I will provide an English version
Bookmarks