For many gamers, Macro is one of the main reasons for using an emulator. It's highly useful for releasing combo skills or performing serial commands when you are AFK. In this tutorial, you'll be introduced:
- Basics of Macro
- Command list for NoxPlayer
- Detailed intro of each command & examples
Basics of Macro
What is Macro key(Script)?
A Macro(Script) is a series of actions based on the commands you set on NoxPlayer that can be executed in sequence with one click.
What does it do?
With the Macro(Script) key, you could designate a string of actions to a single keybind to simplify your operations in games. It's recommended to use the Macro(Script) key in many situations, here are some examples for you to have a clearer idea:
- Pick up weapons and supplies in different columns with one click (PUBG and Free Fire)
- Release a combo with one click (The King of Fighters ALLSTAR)
- Open the bag and select equip + close the bag with one click (PUBG and Free Fire)
- View maps and do multiple clicks with one click (MOBA and FPS game)
- Beginner rerolling for gacha games (complete the whole rerolling process with one click in games like Arknights, Blue Archive, Azur Lane, Konosuba Fantastic Days)
- Complete tasks automatically when AFK (especially for weekly annihilation in Arknights)
How to set up a Macro key(Script) on NoxPlayer?
- Click the “Keyset” tab on the Toolbar
2. Tap on the “Script” key and drag it to the target area. Set a key for executing the macro.
3. Click the edit button right next to the Script key to edit
Command list for NoxPlayer
Before you actually edit the Script key, it is better to check out this Command-line list to know what commands are supported on NoxPlayer.
2022/01/26 Update: the [End loop] command has been added starting from V7.0.2.1
Command name | Command-line to use on NoxPlayer | Description | Example |
---|---|---|---|
click | click x y | x and y stand for the coordinates that you want to click | click 100 100 # This can be used to click the point where the coordinates are (100,100) |
slide | slide x1 y1 x2 y2 | x1 and y1 stand for the coordinates of the starting points of the slide; x2 and y2 stand for the coordinates of the ending points of the slide | slide 100 200 500 800 # This can be used to slide from (100, 200) to (500, 800) |
click the key you set | key [key] | Click the key that you have already set - [key] stands for the keybind that you've set in the keyboard mapping | key R # This can be used to click the key R (which is already designated in the keyboard mapping) |
input texts | input XXXXX | Open the dialog box first and use this command to input content, XXXXX stands for the content | input Hello, guys # This can be used to input text “Hello, guys” |
longpress | longpress x y [time] | Click the key to perform long-press, x and y stand for the coordinates that you want to press, [time] stands for how long(ms) you want to hold the pressing | longpress 100 500 1000 # This can be used to long-press the point whose coordinates are (100, 500) for 1000ms (which is 1 second) |
delay | delay [time] | [time] stands for the time(ms) of delay before executing the next command | delay 500 # This can be used to delay 0.5 second before executing the next command |
press | press | Press the macro key to click the designated coordinates, and release the key to click another place. For example, if you've set “1” for the macro, you can press (and hold) “1” to click (500,400), and release the key to click (800,600). So you can click 2 places in one action. Press and release have to be used in a combination. | press click 500 400 release click 800 600 # When you press (and hold) the macro key, you can click (500, 400) and when you release the key, you can click another point (800, 600) |
release | release | ||
click home tab | click home | Click the key to go back to the desktop of NoxPlayer | click home # This can be used to click the Home tab |
click back tab | click back | Click the key to go back to the previous page | click back # This can be used to click the Back tab |
enter Shooting Mode | click enterShootingMode | Click to enter shooting mode (designed for FPS games) | click enterShootingMode # This can be used to enter shooting mode in FPS games |
exit Shooting Mode | click exitShootingMode | Click to exit shooting mode (designed for FPS games) | click exitShootingMode # This can be used to exit shooting mode in FPS games |
loop | loop [times] | Add a loop to repeat the following actions multiple times, [times] stands for the number of times for the looping | loop 10 click 100 100 loop 3 click 200 200 # This can be used to loop clicking (100, 100) 10 times and then loop clicking (200, 200) 3 times |
end loop | endloop | End the previous loop and continue to perform the actions below | loop 10 click 470 190 end loop delay 1000 loop 5 click 100 100 # This can be used to loop clicking (470, 190) 10 times and then end the loop and delay for 1 second, and execute clicking (100, 100) 5 times |
Detailed intro of each command & examples
Click
Example command line: click 1440 470
How to set it:
- Set a Macro(Script) key in your keyboard mapping (for example we've set “1” for this macro)
- Click the edit button to enter Macro editor
- Hover your mouse cursor to the point that you want to click, you can see the coordinates in the lower right corner. In this example, the coordinates are X: 1440, Y: 470
- Input click and the coordinate to Macro editor. There are 2 ways to do it: you can either ➀ manually input “click 1440 470” in the macro editor or ➁ click the point first, then Nox will automatically get the coordinates of your clicking point, and you can simply add the command by clicking the “+” button.
- Click save to save the settings.
Slide
Example command line: Slide 560 234 225 100
How to set it:
- Set a Macro(Script) key “1”
- Click the edit button to enter Macro editor
- Hover your mouse cursor to the start point and the finish point of the slide, you can see the coordinate in the lower right corner
- Enter slide and the coordinate of the start point and the finish point to Macro editor
- Click to save the settings
- Example: now you can use Macro(Script) key “1” to slide up on Instagram
Delay
Example command line: delay 500
Note: delay is always used between two actions
How to set it:
- Set a Macro(Script) key “Delete”
- Click edit button to enter Macro editor
- Enter two click-actions and add a delay between them
- Click the Macro(Script) key “Delete” to perform delay
Key
Example command line: key 1
How to set it:
- Set a Macro(Script) key “Delete”
- Click edit button to enter Macro editor
- Enter different keys in the Macro editor
- Click the Macro(Script) key “Delete” to perform switching weapons with one click
Input
Example command line: input NoxPlayer rules!
How to set it:
- Set a Macro(Script) key “1”
- Click edit button to enter Macro editor
- Enter “input NoxPlayer rules!” in the Macro editor
- Click the Macro(Script) key “1” to input content with one click
Longpress
Example command line: longpress 1200 800 2000
How to set it:
- Set a Macro(Script) key “Delete”
- Click edit button to enter Macro editor
- Enter the coordinate of the point that you would like to click and the time
- Click the Macro(Script) key “Delete” to perform longpress action with one click
Press & release
Example command line:
press
click 1000 8000
release
click 120 426
Note: The press and release command usually bound with other actions. You can assign different actions under the press and release action. They are often used in FPS and MOBA game to view the map and open backpack.
How to set it:
- Set a Macro(Script) key “M”
- Click edit button to enter Macro editor
- Enter the press, release and the assigned actions
- Click the Macro(Script) key “M” to view the map with press and release the “Tab” key
Click exitShootingMode & click enterShootingMode
Command line:
click exitShootingMode
click enterShootingMode
Note: The click exitShootingMode and click enterShootingMode command is designed for FPS games such as PUBG and Free Fire. They are often used for open backpack and select weapons and supplies.
How to set it:
- Set a Macro(Script) key “Tab”
- Click edit button to enter Macro editor
- Assign the click exitShootingMode and click enterShootingMode command with press and release action
- Click the Macro(Script) key “Tab” to open the backpack and select weapons and supplies with the mouse cursor.
Loop & end loop (end loop can only be used in versions higher than V7.0.2.1)
Example command line: loop 3
Note: The loop [count] command is used to set the execute times of the following action
How to set it:
- Set a Macro(Script) key “Delete”
- Click edit button to enter Macro editor
- Enter loop 3 and an action to execute loops of this action
- Click the Macro(Script) key “Delete” to execute loops of this action
Note: End loop is used to end the loop above and continue to execute the commands below.
For example here are the command lines that can be set:
loop 10 # Loop the following command (click the point with the coordinates x=478 y=199) for 10 times
click 478 199 # Click the point with the coordinates x=478 y=199
endloop # After looped for 10 times, end the loop and execute the commands below
delay 1000 # Wait for 1 second (1000ms=1s)
loop 5 # Loop the following command (click the point with the coordinates x=77 y=204) for 5 times
click 77 204 # Click the point with the coordinates x=77 y=204
Click home
Example command line: click home
How to set it:
- Set a Macro(Script) key “Delete”
- Click edit button to enter Macro editor
- Enter “click home” in the Macro editor
- Click the Macro(Script) key “Delete” to back to desktop with one click
Click back
Example command line: click back
How to set it:
- Set a Macro(Script) key “Delete”
- Click the edit button to enter Macro editor
- Enter “click home” in the Macro editor
- Click the Macro(Script) key “Delete” to back to the previous page
In addition, when you set to loop the Macro too many times, the time required for a single macro will be prolonged. At the moment, you can interrupt the current Macro or operation by our new function. Click here to check.