Hello, CloudControl Pro

October 22, 2022

Hello, CloudControl Pro

Software Installation

Download and install the CloudControl Pro client on the official website https://g.pro.autojs.orgopen in new window. 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: MDNopen in new window, 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.14open in new window, 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).
  • V8open in new window. 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.

Last update:
Contributors: Bruce