| Table of methods |
|---|
| Returns if variable is a constant variable |
| isConstant($variable: Mixed): Boolean |
| Set constant |
| setConstant($constant: String, $value: Mixed): Mixed |
| Returns if variable is a reference variable |
| isReference($variable: Mixed): Boolean |
| Get variable type |
| getType($variable: Mixed): String |
| Returns if variable exists |
| hasVariable($variable: String): Boolean |
| Get variable |
| getVariable($variable: String): Mixed |
| Set variable |
| setVariable($variable: String, $value: Mixed[, $operator: Integer]): Mixed |
| Add |
| add($a: Mixed, $b: Mixed[, $operator: Integer]): Mixed |
| Logical and |
| and($a: Boolean, $b: Boolean[, $operator: Integer]): Boolean |
| Bitwise and |
| bitwiseAnd($a: Integer, $b: Integer[, $operator: Integer]): Integer |
| Bitwise not |
| bitwiseNot($value: Integer[, $operator: Integer]): Integer |
| Bitwise or |
| bitwiseOr($a: Integer, $b: Integer[, $operator: Integer]): Integer |
| Bitwise xor |
| bitwiseXor($a: Integer, $b: Integer[, $operator: Integer]): Integer |
| Create boolean |
| boolean($boolean: Boolean): Boolean |
| Break out of forCondition or forTime loop |
| break([$levels: Integer]): Null |
| Begins a case block within a switch block, which will be executed if the case value has matched |
| case($value: Mixed): Null |
| Catch block |
| catch(&$exception: Mixed): Null |
| Continue to next iteration of forCondition or forTime loop |
| continue([$levels: Integer]): Null |
| Begins a default block within a switch block, which will be executed if no case value has matched |
| default(): Null |
| Divide |
| div($a: Mixed, $b: Mixed[, $operator: Integer]): Mixed |
| Else |
| else(): Null |
| Else if |
| elseif($condition: Boolean): Null |
| End |
| end(): Null |
| Equals |
| equals($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| For condition |
| forCondition($condition: Boolean[, $iterationStacklet: Stacklet]): Null |
| For time |
| forTime($time: Integer): Null |
| Greater |
| greater($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| Greater equals |
| greaterEquals($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| If |
| if($condition: Boolean): Null |
| Create integer |
| integer($integer: Integer): Integer |
| Lesser |
| lesser($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| Lesser equals |
| lesserEquals($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| Execute a member method of an object |
| memberExecute(&$object: Mixed, $method: String, $operator: Integer, ...): Mixed |
| Access map/object member property |
| memberProperty(&$object: Map, $property: String[, $operator: Integer]): Mixed |
| Compute modulo |
| mod($value: Number, $range: Number[, $operator: Integer]): Number |
| Multiply |
| mul($a: Mixed, $b: Mixed[, $operator: Integer]): Mixed |
| Logical not |
| not($boolean: Boolean[, $operator: Integer]): Boolean |
| Logical not equal |
| notEqual($a: Mixed, $b: Mixed[, $operator: Integer]): Boolean |
| Logical or |
| or($a: Boolean, $b: Boolean[, $operator: Integer]): Boolean |
| Postfix decrement |
| postfixDecrement(&$variable: Integer[, $operator: Integer]): Integer |
| Postfix increment |
| postfixIncrement(&$variable: Integer[, $operator: Integer]): Integer |
| Prefix decrement |
| prefixDecrement(&$variable: Integer[, $operator: Integer]): Integer |
| Prefix increment |
| prefixIncrement(&$variable: Integer[, $operator: Integer]): Integer |
| Returns from function with optional return value |
| return([$value: Mixed]): Null |
| Returns the current stack trace |
| stackTrace(): String |
| Subtract |
| sub($a: Mixed, $b: Mixed[, $operator: Integer]): Mixed |
| Subscript operator |
| subscript(&$array: Array, $index: Integer[, $operator: Integer]): Mixed |
| Swap two variables |
| swap(&$a: Mixed, &$b: Mixed): Null |
| Begins switch block to match a given value to case values or a default |
| switch($value: Mixed): Null |
| Throw an exception |
| throw($exception: Mixed): Null |
| Try block |
| try(): Null |
| Table of methods |
|---|
| Get application command line arguments |
| application.getArguments(): Array |
| Execute application |
| application.execute($command: String[, &$exitCode: ?Integer[, &$error: ?String]]): String |
| Execute multiple applications |
| application.executeMultiple($commands: Array[, $concurrency: Integer]): Boolean |
| Exit application with optional exit code |
| application.exit([$exitCode: Integer]): Null |
| Table of methods |
|---|
| Returns hardware thread count, which usually is the number of CPU cores(* 2, if hyperthreading is enabled) |
| concurrency.getHardwareThreadCount(): Integer |
| Table of methods |
|---|
| Pretty print variable to console |
| console.dump($value: Mixed): Null |
| Print to console without trainling new line |
| console.print(...): Null |
| Print to console with a trailing new line |
| console.printLine(...): Null |
| Read all input into string value |
| console.readAll(): String |
| Read all input into array of strings |
| console.readAllAsArray(): Array |
| Read a line from input |
| console.readLine(): String |
| Table of methods |
|---|
| Print to error console/stream without trainling new line |
| console.error.print(...): Null |
| Print to error console/stream with a trailing new line |
| console.error.printLine(...): Null |
| Table of methods |
|---|
| Returns if a script has a specific callable function |
| context.script.hasCallable($scriptId: String, $callable: String): Boolean |
| Returns all script ids of its context |
| context.script.getScriptIds(): Array |
| Call a script callable function |
| context.script.call($scriptId: String, $callable: String, ...): Mixed |
| Load a script into context |
| context.script.loadScript($scriptId: String, $pathName: String, $fileName: String[, $verbose: Boolean]): Null |
| Remove a script from context |
| context.script.removeScript($scriptId: String): Null |
| Table of methods |
|---|
| Decode a Base64 encoded string |
| cryptography.base64.decode($value: String): String |
| Encode a string using Base64 |
| cryptography.base64.encode($value: String): String |
| Table of methods |
|---|
| Hash a string using SHA256 |
| cryptography.sha256.encode($value: String): String |
| Table of methods |
|---|
| Get canonical URI |
| filesystem.getCanonicalURI($pathName: String, $fileName: String): String |
| Get file content as byte array |
| filesystem.getContent($pathName: String, $fileName: String): ByteArray - throws exception |
| Set file content from byte array |
| filesystem.setContent($pathName: String, $fileName: String, $content: ByteArray): Null - throws exception |
| Get file content as string |
| filesystem.getContentAsString($pathName: String, $fileName: String): String - throws exception |
| Get file content as string array |
| filesystem.getContentAsStringArray($pathName: String, $fileName: String): Array - throws exception |
| Set file content from string |
| filesystem.setContentFromString($pathName: String, $fileName: String, $content: String): Null - throws exception |
| Set file content from string array |
| filesystem.setContentFromStringArray($pathName: String, $fileName: String, $content: Array): Null - throws exception |
| Get current working path name |
| filesystem.getCurrentWorkingPathName(): String - throws exception |
| Returns if given URI is a drive name(applies to Microsoft Windows only) |
| filesystem.isDrive($uri: String): Boolean |
| Extracts file name from given URI |
| filesystem.getFileName($uri: String): String |
| Returns file size for file |
| filesystem.getFileSize($pathName: String, $fileName: String): Integer - throws exception |
| Not documented |
| filesystem.getFileTimeStamp($pathName: String, $fileName: String): Integer - throws exception |
| Returns if given URI is a path |
| filesystem.isPath($uri: String): Boolean - throws exception |
| Extracts path name from given URI |
| filesystem.getPathName($uri: String): String |
| Change current working path |
| filesystem.changePath($pathName: String): Null - throws exception |
| Compose URI from given path name and file name |
| filesystem.composeURI($pathName: String, $fileName: String): String |
| Create path |
| filesystem.createPath($pathName: String): Null - throws exception |
| Returns if URI does exist |
| filesystem.exists($uri: String): Boolean - throws exception |
| List folder |
| filesystem.list($pathName: String): Array - throws exception |
| Move file/folder from a location to another location |
| filesystem.move($uriFrom: String, $uriTo: String): Null - throws exception |
| Removes a file with given file name |
| filesystem.removeFile($pathName: String, $fileName: String): Null - throws exception |
| Removes a file extension from given file name |
| filesystem.removeFileExtension($fileName: String): String |
| Removes a path from file system |
| filesystem.removePath($pathName: String, $recursive: Boolean): Null - throws exception |
| Renames a file/folder |
| filesystem.rename($fileNameFrom: String, $fileNameTo: String): Null - throws exception |
| Table of methods |
|---|
| Create float |
| float($float: Float): Float |
| Convert integer bit representation of float to float |
| float.fromIntegerValue($integer: Integer): Float |
| Convert float to integer bit representation of float |
| float.toIntegerValue($float: Float): Integer |
| Table of methods |
|---|
| Decode hexadecimal string to integer value |
| hex.decode($value: String): Integer |
| Encode integer value to hexadecimal string |
| hex.encode($value: Integer): String |
| Table of methods |
|---|
| Deserialize JSON |
| json.deserialize($json: String): Mixed |
| Serialize JSON |
| json.serialize($value: Mixed): String |
| Table of methods |
|---|
| Returns number as positive number |
| math.abs($value: Number): Number |
| Returns number to be positive within given range |
| math.absmod($value: Number, $range: Number): Number |
| Compute acos |
| math.acos($x: Float): Float |
| Compute asin |
| math.asin($x: Float): Float |
| Compute atan |
| math.atan($x: Float): Float |
| Compute atan2 |
| math.atan2($y: Float, $x: Float): Float |
| Round float up to next higher integer |
| math.ceil($value: Float): Float |
| Returns number clamped to be in given range |
| math.clamp($value: Number, $min: Number, $max: Number): Number |
| Compute acos |
| math.cos($x: Float): Float |
| Compute exp |
| math.exp($power: Float): Float |
| Round float down to next lower integer |
| math.floor($value: Float): Float |
| Compute log |
| math.log($value: Float): Float |
| Returns maximum number of given values |
| math.max($value1: Number, $value2: Number): Number |
| Returns minimum number of given values |
| math.min($value1: Number, $value2: Number): Number |
| Compute modulo/remainder |
| math.mod($value: Number, $range: Number): Number |
| Compute pow |
| math.pow($base: Number, $power: Number): Number |
| Create a random number between 0.0 and 1.0 |
| math.random(): Float |
| Round float up or down to integer |
| math.round($value: Float): Float |
| Returns sign of given number |
| math.sign($value: Number): Number |
| Compute sin |
| math.sin($x: Float): Float |
| Compute square root |
| math.sqrt($value: Float): Float |
| Compute square product |
| math.square($value: Number): Number |
| Compute tan |
| math.tan($x: Float): Float |
| Table of methods |
|---|
| Execute a HTTP/HTTPS GET request |
| network.httpclient.get($url: String[, $queryParameters: ?Map[, $headers: ?Map]]): Map - throws exception |
| Execute a HTTP/HTTPS DELETE request |
| network.httpclient.delete($url: String[, $queryParameters: ?Map[, $headers: ?Map]]): Map - throws exception |
| Execute a HTTP/HTTPS HEAD request |
| network.httpclient.head($url: String[, $queryParameters: ?Map[, $headers: ?Map]]): Map - throws exception |
| Execute a HTTP/HTTPS POST request |
| network.httpclient.post($url: String, $data: Mixed[, $queryParameters: ?Map[, $headers: ?Map]]): Map - throws exception |
| Execute a HTTP/HTTPS PUT request |
| network.httpclient.put($url: String, $data: Mixed[, $queryParameters: ?Map[, $headers: ?Map]]): Map - throws exception |
| Table of methods |
|---|
| Get global scope script variables |
| script.getGlobalVariables(): Map |
| Returns if script runs natively |
| script.isNative(): Boolean |
| Get current scope script variables |
| script.getVariables(): Map |
| Call script function |
| script.call($function: String, ...): Mixed |
| Call function by function variable |
| script.callFunction($function: Function, ...): Mixed |
| Call script stacklet |
| script.callStacklet($stacklet: String): Mixed |
| Evaluate a script statement |
| script.evaluate($statement: String): Mixed |
| Stop script |
| script.stop(): Null |
| Wait for given milliseconds |
| script.wait($time: Integer): Null |
| Wait for condition to happen |
| script.waitForCondition(): Null |
| Table of methods |
|---|
| Get last error message if any occurred |
| script.error.getMessage(): ?String |
| Get last error statement if any exists |
| script.error.getStatement(): ?Map |
| Table of methods |
|---|
| Get time as string |
| time.getAsString([$format: String]): String |
| Get current time in milliseconds |
| time.getCurrentMillis(): Integer |
| Table of methods |
|---|
| Create XML tag |
| xml.createTag($name: String[, $attributes: Map[, $innerXML: String]]): String |
- Syntax
- Data types, variables and constants
- Flow control - if, elseif and else
- Flow control - switch, case and default
- Flow control - forTime, forCondition, for and forEach
- Flow control - exceptions
- Functions
- Lambda functions
- Classes
- Modules
- Built-in functions
- Built-in classes
- Operators
- Constants
- MinitScript, see README.md
- MinitScript - How to build, see README-BuildingHowTo.md
- MinitScript - How to use, see README-Tools.md
- The Mindty Kollektiv Discord Server
