Features of MKScript mouse and keyboard automated script interpreter
Variable type
type | describe | Example |
char | Character type | char c = 'a' |
int | integer | int m = 1, n = 2 |
double | floating point | double x = 3.14 |
string | string | string t = "Hello" |
Explanation: No matter where the variables in the MKScript script are defined, they are [global variables], and their scope is global.
Arithmetic operators
symbol | describe | Example |
+ | add | int m = 5 + 3 |
- | reduce | int m = 6 - 5 |
* | take | int m = (3 + 2) * 6 |
/ | remove | int m = 6 / 3 |
% | Remainder (modulo) | int m = 6% 2 |
Comparison operators
symbol | describe | Example |
> | greater than |
|
>= | greater than or equal to |
|
== | equal to |
|
< | less than |
|
<= | less than or equal to |
|
!= | not equal to |
|
Logical operators
symbol | describe | Example |
&& | AND operation (and) | a && b, if both a and b are true, the result is true |
|| | Or operation (or) | a || b, if either a or b is true, the result is true |
Explanation: The optimization level of && is higher than ||
Conditional statement
Grammar style 1 | Grammar style 2 | Grammar style 3 |
if a > b Code block... endif |
if a > b Code block... elseif a == b Code block... else Code block... endif |
if get_color_at(x, y) == color Code block... elseif get_color_at(x, y) == color_2 Code block... else Code block... endif |
illustrate:
If and endif must appear in pairs.
Loop statement
Grammar style 1 | Grammar style 2 |
loop 3 Code block... endloop |
loop a > b Code block... endloop |
illustrate:
loop and endloop must appear in pairs.
Loop 3 means: loop the code block 3 times.
Loop a > b means: when a > b, the code block will be executed in a loop.
keywords | describe |
break | Break out of the loop. Breaking out of the loop will continue to execute the code after the loop. |
continue | Interrupts the current iteration of the loop if the specified condition occurs, then continues with the next iteration of the loop. |
Code comments
annotation symbol | describe |
# | Single line comment symbol. If a comment is required, # must be written at the beginning of the line. |
Function
function type | describe | List |
mouse | Mouse operation functions start with mouse_. | mouse_move_to(30, 20) |
keyboard | Keyboard operation functions start with key_. | key_char('a', 1) |
other |
|
sleep(1000) |
MKScript Mouse Keyboard Automation Script Interpreter Update Log
1. New function:
Worksheet_copy()
Worksheet_save_as()
Workbook_save_copy_as()
Workbooks_close()
2. Function changes
The workbook_save_as() function has a new optional parameter: fileFormat
Huajun editor recommends:
MKScript mouse and keyboard automated script interpreter is a software that does not require learning to use. It is a very simple tool. Users in need can download and use it in the Huajun Software Park. You are guaranteed to be satisfied. In addition, there are many similar software of the same type available for download, such as:Fast table software,He Xiaoxiang programming client,Automated testing tool AutoRunner,Easy GUI,Little turtle LOGO languagewait.
it works
it works
it works