Script editor, all commands with examples

List of possible tasks

 

Go to the script editor.

 

Scripting Instructions


1. The scripting language was developed specifically for the BotMek project and is unique in nature; all coincidences with other languages are random.
2. The language has case-insensitive syntax.
3. Each team must begin with a new line.
4. Each team must have at least 1 parameter taken in parentheses (parameter).
5. The command ending is a semicolon - ; .

 

Mouse clicks 

Pressing the left mouse button (press and release)


Command
left(X, Y, Time);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Examples
left(10,15); //Left-click on the coordinates X10, Y15
left(10,15,1000); //Left-click on the coordinates X10, Y15 and hold for 1 second
left(cursorX,cursorY); //Left-click on the coordinates of the current position of the mouse.

 

Зажатие левой кнопки мышки (нажать без отпускания) 


Command
leftDOWN(X, Y);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Примеры
leftDOWN(10,15); //To clamp the left mouse button in coordinates X10, Y15
leftDOWN(cursorX,cursorY); //Hold the left mouse button in the coordinates of the current position of the mouse

 

Отпускание левой кнопки мышки (отжать) 


Command
leftUP(X, Y);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Examples
leftUP(10,15); //Release the left mouse button in coordinates X10, Y15
leftUP(cursorX,cursorY); //Release the left mouse button in the coordinates of the current position of the mouse

 

Нажатие правой кнопки мышки (нажать и отпустить) 


Command
right(X, Y, Time);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Examples
right(10,15); //Right-click on the coordinates X10, Y15
right(10,15,1000); //Right-click on the coordinates X10, Y15 and hold for 1 second
right(cursorX,cursorY); //Right-click on the coordinates of the current position of the mouse.

 

Зажатие правой кнопки мышки (нажать без отпускания) 


Command
rightDOWN(X, Y);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Examples
rightDOWN(10,15); //To clamp the right mouse button in coordinates X10, Y15
rightDOWN(cursorX,cursorY); //Hold the right mouse button in the coordinates of the current position of the mouse

 

Отпускание правой кнопки мышки (отжать) 


Command
rightUP(X, Y);
Options
X - coordinates along the X axis, required parameter, integer; Y - coordinates along the Y axis, required parameter, integer; Time - the duration of clamping in milliseconds, an optional parameter, an integer;

As coordinates X and Y can take the parameter CursorX and CursorY;

CursorX - coordinates of the current position of the mouse on the X axis;

CursorY - coordinates of the current position of the mouse on the Y axis;

Examples
rightUP(10,15); //Release the right mouse button in coordinates X10, Y15
rightUP(cursorX,cursorY); //Release the right mouse button in the coordinates of the current position of the mouse

 

 

Нажатия клавиатуры 


Нажатие клавиатурной клавиши (нажать и отпустить) 


Command
Send(Key, Time);
Options
Key - key to be pressed, required parameter, English layout; Time - the duration of pressing in milliseconds, an optional parameter, an integer;
Examples
Send(G); //Press the G key
Send(G, 2000); //Hold G for 2 seconds, then release

 

Зажатие клавиатурной клавиши (нажать без отпускания) 


Command
SendDOWN(Key);
Options
Key - key to be pressed, required parameter, English layout;
Examples
SendDOWN(G); //Hold G

 

Отпускание клавиатурной клавиши (отжать) 


Command
SendUP(Key);
Options
Key - key to be pressed, required parameter, English layout;
Examples
SendUP(G); //Release the G key

 

Possible values of the Key parameter


   Esc      F1      F2      F3      F4      F5      F6      F7      F8      F9      F10      F11      F12      Del      Home      End      PrtScn      `      1      2      3      4      5      6      7      8      9      0      -      =      Backspace      NumLock      Insert      Tab      Q      W      E      R      T      Y      U      I      O      P      [      ]      \      PageUp      PageDown      Caps      A      S      D      F      G      H      J      K      L      ;      '      Enter      Pause      Shift      Z      X      C      V      B      N      M      ,      .      /      Ctrl      Win      Alt      Space      right      left      down      up   

 

Sleep/Delay


Command
Sleep(Time);
Options
Time - delay duration in milliseconds, required parameter, integer;
Examples
Sleep(2000); //Wait 2 seconds

 

Comments in code


The comment in the code is the text that is not taken into account by the compiler. Comments are used for notes by users.
The text of the comment begins with a double spit dash "//", all that goes further is a comment.

Examples

//This text is a comment.

 

Blocks (collapse / expand)


The region directive allows you to specify a block of code that can be expanded and collapsed.
In large code files, it is very convenient to minimize or hide one or more areas,
so as not to distract attention from the part of the file that is currently being worked on.
At the end of the #region block, the directive #endregion must be present.

Examples

The hidden part of the code 
#endregion