Hello, CloudControl Pro
Hello, CloudControl Pro
Software Installation
Download and install the CloudControl Pro client on the official website https://g.pro.autojs.org. CloudControl Pro supports devices above Android 5.0, including emulators, etc., but due to reinforcement reasons, it cannot be started on devices with the XP framework installed.
Open the mobile cloud control app
First line of code
Go to the main page, open the script management page, and click the menu button in the bottom right corner。
Click to create a new file
Enter a file name, such as"index.js",Click OK。
Click to open editing
In the editing input box, we enter the first line of code here:
toastLog('你好,CloudControl')
Click the return button and save, then click run CloudControl to pop up a bubble message"你好,CloudControl"
And print it in the running log.
At this point, we have successfully written and run the first line of code. CloudControl is a tool and framework that allows developers to write code to complete automation and interfaces. It can also package the code as an apk file for independent distribution.
In the future, we will write and run more codes on this editor or computer editor to realize our own ideas.
Of course, if you don't want to write it yourself, you can also download other people's codes from the store or the Internet for reference and run them (files from the Internet may contain malicious codes, please identify them carefully).
JavaScript language
The js
in CloudControl is actually an abbreviation for JavaScript, which is the programming language used by CloudControl. JavaScript is a very popular language, which is widely used in Web front-end, Node.js back-end, desktop development, etc.
Therefore, if you have no programming foundation, it is strongly recommended to learn JavaScript before learning CloudControl. The following tutorials and websites are recommended:
- Text tutorial: MDN, mozilla official tutorial, translation style, will not involve concepts in the Web
JavaScript engine selection
CloudControl Pro currently supports two JavaScript engines
- Rhino 1.7.14, supports ES5 and some ES6 features (ES5 and a small part of ES6). The engine used by the free version and the old Pro version does not have perfect support for the new JS standard. The API based on this engine is called the API v1 or Rhino API (API v1).
- V8. In version 9.0, CloudControl Pro added a Node.js 16.x engine based on the V8 engine. Node.js is a mature and popular JavaScript runtime. It has many applications in the front-end and back-end development of the Web, and in the cross-platform application development of Electron. Using Node.js allows for higher performance and better code protection. APIs based on the Node.js engine are called API v2s or Node.js APIs.
If you are a novice without any programming foundation, it is recommended to try the Rhino engine and the API v1 first. You don't need special configuration, and the code is executed with this engine by default. After a period of follow-up study, I will come into contact with Node.js and the API v2.
If you want to know the difference between the two engines and how to choose, please refer to API v2 Docs.