Update README.md

This commit is contained in:
BratPfanneTV 2018-10-17 09:04:58 +02:00 committed by GitHub
parent aef8b709bf
commit b7c2d94b6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,23 +24,33 @@ the directory to the PATH-Environment-Variable.
# Documentation # Documentation
| Command | Version Added | Syntax | Description | | Command | Version Added | Output | Syntax | Description |
| ---------------- | ------------- | ----------------------------------- | ----------- | | ---------------- | ------------- | ------ | ----------------------------------- | ----------- |
| ANIMATION | v1 | `ANIMATION <MS> <ANIMATION>` | Plays an animation. **MS** specifies the amount of Milliseconds per Frame, and **ANIMATION** is just all the animation frames seperated by spaces. <br /> Example: <br /> ANIMATION 200 U u .. u <br /> Will animate to: <br /> U u .. u U u .. u U u .. u U u .. u U u .. u<br /><br />To have your code continue while the animation is running, call it with `START /B` | | ANIMATION | v1 | *stdout* **animation** | `ANIMATION <MS> <ANIMATION>` | Plays an animation. **MS** specifies the amount of Milliseconds per Frame, and **ANIMATION** is just all the animation frames seperated by spaces. <br /> Example: <br /> ANIMATION 200 U u .. u <br /> Will animate to: <br /> U u .. u U u .. u U u .. u U u .. u U u .. u<br /><br />To have your code continue while the animation is running, call it with `START /B` |
| CONSOLE | v3 | `CONSOLE cursorsize <0-100>` | Sets the cursor to the given size. Set to 0 to make it disappear. | | CALCULATOR | v4 | *errorlevel* **result**\**1000000* | `CALCULATOR <mode> <num1> [<num2>]` | Performs mathematical operations. All numbers are inputted as *actual number*\**1000000*, and also outputted as such, to provide decimal place accuracy. |
| | | `CONSOLE windowscroll <x> <y>` | Scrolls the window to the given point, measured from the top left corner. | | | | | `CALCULATOR A <num1> <num2>` | Adds to numbers together. |
| | | `CONSOLE windowsize <x> <y>` | Resizes the window to the given width and height. | | | | | `CALCULATOR S <num1> <num2>` | Subtracts **num2** from **num1**. |
| | | `CONSOLE clear` | Clears the window. | | | | | `CALCULATOR D <num1> <num2>` | Divides **num1** by **num2**. |
| | | `CONSOLE get <setting>` | Returns the current value of the settings *cursorsize*, *windowscroll* or *windowsize*. Also, you can get the current window *title* with it. | | | | | `CALCULATOR M <num1> <num2>` | Multiplies the numbers by each other. |
| cTIME | v2 | `cTIME <TIMESTAMP>` | Converts a Millisecond-Unix-Timestamp to human-readable time, ready to output. | | | | | `CALCULATOR P <num1> <num2>` | Takes **num1** to the power of **num2**. |
| MAKEANIMATION | v1 | `MAKEANIMATION <Type> <Sub> [WORD]` | Outputs a valid animation value for the `ANIMATION` command. <br /><br />Types: <br />`Rotate`:<br />`0 - / - \ \|`<br />`1 - ^ > V <`<br />`2 - + x`<br />`3 - p d b q`<br />`Range`:<br />Returns a set of numbers from 0 to the given number.<br />`Alphabet`:<br />Returns **n** letters of the alphabet. Maximum is 26.<br />`Appear`<br />Accepts the **WORD** Parameter, while a *0* for **Sub** is required. It makes the given word appear one letter at a time. | | | | | `CALCULATOR F <num1>` | Returns **num1**'s factorial. |
| PRINT | v1 | `PRINT <String>` | Prints the **String**. Only difference to the built-in `echo` is that no newline is added at the end. | | | | | `CALCULATOR R <num1> <num2>` | Returns the **num2**th root of **num1**. |
| READKEY | v3 | `READKEY <MS>` | Waits **MS** Milliseconds for a keypress, then returns 0. The returned number when a key is pressed consists of two values:<br />Example: `7068`<br />The *68* stands for the <u>KeyCode</u> of the pressed key, in this case *D*. The 7 at the beginning stands for the Modifier-buttons that were pressed:<br />`0 - None, 1 - Alt, 2 - Shift, 3 - Alt+Shift, 4 - Control, 5 - Control+Alt, 6 - Control+Shift, 7 - Control+Alt+Shift`.<br />These values can be extracted using *Division* and *Modulo*. | | CALCULATOR-CMD | v4 | *errorlevel* **result**\**10* | `CALCULATOR-CMD <mode> <num1> [<num2>]` | Has the same functionality as `CALCULATOR`, but the multiplier is only *10*. |
| SLEEP | v3 | `SLEEP <MS>` | Pauses the script for **MS** Milliseconds. | | CALCULATOR-BASIC | v4 | *stdout* **result** | `CALCULATOR-BASIC <operation>` | Computes the operation. Only supports the 4 basic operations, and only supports whole numbers. |
| STARTINVISBLE | v3 | `STARTINVISIBLE <script file>` | When used with `START /B`, this starts a batch-script as invisible. This script can then do whatever you want. When executed, the command writes the PID of the started process to `%temp%\processid.txt`, so you can terminate it with `taskkill` at any time. This may be updated to return the PID in *errorlevel* and not require *start /b* in a future version. | | CONSOLE | v3 | *none* | `CONSOLE cursorsize <0-100>` | Sets the cursor to the given size. Set to 0 to make it disappear. |
| STRLEN | v1 | `STRLEN <String>` | Returns the amount of characters in **String** in `%errorlevel%` | | | | | `CONSOLE windowscroll <x> <y>` | Scrolls the window to the given point, measured from the top left corner. |
| uTIME | v2 | `uTIME`<br />`uTIME -c` | Returns the current time as Millisecond-Unix-Timestamp. | | | | | `CONSOLE windowsize <x> <y>` | Resizes the window to the given width and height. |
| | | `uTIME -f <File>` | Returns the last modification date for **File** as Millisecond-Unix-Timestamp. | | | | | `CONSOLE clear` | Clears the window. |
| | | `uTIME -fc <File>` | Returns the creation date for **File** as Millisecond-Unix-Timestamp. | | | | *stdout* **value** | `CONSOLE get <setting>` | Returns the current value of the settings *cursorsize*, *windowscroll* or *windowsize*. Also, you can get the current window *title* with it. |
| xCOLOR | v1 | `xCOLOR <Color>` | Sets the print color to **Color**, as seen in `color`, but only for the text after it. | | cTIME | v2 | *stdout* **timestring** | `cTIME <TIMESTAMP>` | Converts a Millisecond-Unix-Timestamp to human-readable time, ready to output. |
| xPRINT | v1 | `xPRINT <File>` | Reads the **File** as Instructions and executes them all at once. <br /><br />`c00` - `Changes Color. (to 00 in this case.)`<br />`eHello` - `Prints something. ("Hello" in this case.)`<br />`n` - `New line.` | | MAKEANIMATION | v1 | *stdout* **animation-string** | `MAKEANIMATION <Type> <Sub> [WORD]` | Outputs a valid animation value for the `ANIMATION` command. <br /><br />Types: <br />`Rotate`:<br />`0 - / - \ \|`<br />`1 - ^ > V <`<br />`2 - + x`<br />`3 - p d b q`<br />`Range`:<br />Returns a set of numbers from 0 to the given number.<br />`Alphabet`:<br />Returns **n** letters of the alphabet. Maximum is 26.<br />`Appear`<br />Accepts the **WORD** Parameter, while a *0* for **Sub** is required. It makes the given word appear one letter at a time. |
| PRINT | v1 | *stdout* **string** | `PRINT <String>` | Prints the **String**. Only difference to the built-in `echo` is that no newline is added at the end. |
| READKEY | v3 | *errorlevel* **keyCode** | `READKEY <MS>` | Waits **MS** Milliseconds for a keypress, then returns 0. The returned number when a key is pressed consists of two values:<br />Example: `7068`<br />The *68* stands for the <u>KeyCode</u> of the pressed key, in this case *D*. The 7 at the beginning stands for the Modifier-buttons that were pressed:<br />`0 - None, 1 - Alt, 2 - Shift, 3 - Alt+Shift, 4 - Control, 5 - Control+Alt, 6 - Control+Shift, 7 - Control+Alt+Shift`.<br />These values can be extracted using *Division* and *Modulo*. |
| SLEEP | v3 | *none* | `SLEEP <MS>` | Pauses the script for **MS** Milliseconds. |
| STARTINVISBLE | v3 | *none* | `STARTINVISIBLE <script file>` | When used with `START /B`, this starts a batch-script as invisible. This script can then do whatever you want. When executed, the command writes the PID of the started process to `%temp%\processid.txt`, so you can terminate it with `taskkill` at any time. This may be updated to return the PID in *errorlevel* and not require *start /b* in a future version. |
| STRLEN | v1 | *errorlevel* **length** | `STRLEN <String>` | Returns the amount of characters in **String** in `%errorlevel%` |
| uTIME | v2 | *stdout* **epoch-time in milliseconds** | `uTIME`<br />`uTIME -c` | Returns the current time as Millisecond-Unix-Timestamp. |
| | | | `uTIME -f <File>` | Returns the last modification date for **File** as Millisecond-Unix-Timestamp. |
| | | | `uTIME -fc <File>` | Returns the creation date for **File** as Millisecond-Unix-Timestamp. |
| xCOLOR | v1 | *none* | `xCOLOR <Color>` | Sets the print color to **Color**, as seen in `color`, but only for the text after it. |
| xPRINT | v1 | *stdout* **output** | `xPRINT <File>` | Reads the **File** as Instructions and executes them all at once. <br /><br />`c00` - `Changes Color. (to 00 in this case.)`<br />`eHello` - `Prints something. ("Hello" in this case.)`<br />`n` - `New line.` |