Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does autojs put all the configuration files on the same line?
How does autojs put all the configuration files on the same line?
The configuration file contents of Auto.js are displayed on the same line. You can use the JSON.stringify () function to convert it into a string, and then set the indentation parameter to 0.

Config is a JavaScript object containing the configuration information of Auto.js By calling the JSON.stringify () function, it is converted into a string-type configString, and the indentation parameter is set to 0, that is, all attributes are displayed on the same line. Finally, output the string through the console.log () method.

Auto.js is an Android automation tool based on JavaScript, which can realize functions such as auto-running, auto-testing, interface operation and key wizard on Android devices. Based on Node.js and Rhino engine, a complete set of API is provided, which can directly control Android devices with JavaScript.