Function Reference
From Sputnik Wiki
(Difference between revisions)
(→File Create/Read/Write Functions) |
|||
Line 8: | Line 8: | ||
=== Core Functions === | === Core Functions === | ||
− | |||
− | |||
==== Language Features ==== | ==== Language Features ==== | ||
− | |||
* [[Core Function Regex Match|<Expression> =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups | * [[Core Function Regex Match|<Expression> =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups | ||
* [[Core Function Regex Replace|<Expression> =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups | * [[Core Function Regex Replace|<Expression> =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups | ||
* [[Core Function Goto Label|Goto Label; & Label:]] -- Jump to another section of the script | * [[Core Function Goto Label|Goto Label; & Label:]] -- Jump to another section of the script | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Console Functions ==== | ==== Console Functions ==== | ||
− | |||
− | |||
* [[Core Function Print|Print( <expression> )]] -- Prints an expressions string value to the console window | * [[Core Function Print|Print( <expression> )]] -- Prints an expressions string value to the console window | ||
− | * [[Core Function Println|Println( <expression> )]] -- Prints an expressions string value to the console window and inserts a newline | + | * [[Core Function Println|Println( <expression> )]] -- Prints an expressions string value to the console window and inserts a newline charactor at the end. |
− | * [[Core Function Printf|Printf( <expression>, <expressions>... | + | * [[Core Function Printf|Printf( <expression>, <expressions>... )]] -- Print a formatted string to the console window |
− | + | ||
− | + | ||
* [[Core Function Input|Input( <expression> )]] -- Capture a string typed to console window | * [[Core Function Input|Input( <expression> )]] -- Capture a string typed to console window | ||
* [[Core Function InputC|InputC( <expression> )]] -- Capture a char typed to console window | * [[Core Function InputC|InputC( <expression> )]] -- Capture a char typed to console window | ||
− | * [[Core Function | + | * [[Core Function Cls|Cls( )]] -- Clear all text from the console window |
− | + | ||
− | + | ||
* [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window | * [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window | ||
* [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window | * [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window | ||
− | |||
* [[Core Function ConsoleBeep|ConsoleBeep( <freq>, <duration> )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker | * [[Core Function ConsoleBeep|ConsoleBeep( <freq>, <duration> )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker | ||
* [[Core Function ConsoleSeek|ConsoleSeek( <x>, <y> )]] -- Set the position of the console cursor | * [[Core Function ConsoleSeek|ConsoleSeek( <x>, <y> )]] -- Set the position of the console cursor | ||
Line 61: | Line 40: | ||
==== Multi-Threading Functions ==== | ==== Multi-Threading Functions ==== | ||
− | * [[Core Function ThreadCreate|ThreadCreate( <name>, <function | + | * [[Core Function ThreadCreate|ThreadCreate( <name>, <function> )]] -- Create a new thread and start it off executing a function or some code |
* [[Core Function ThreadSleep|ThreadSleep( <name> )]] -- Freeze a thread and make it sleep | * [[Core Function ThreadSleep|ThreadSleep( <name> )]] -- Freeze a thread and make it sleep | ||
* [[Core Function ThreadResume|ThreadResume( <name> )]] -- Unfreeze a thread and allow it to continue execution | * [[Core Function ThreadResume|ThreadResume( <name> )]] -- Unfreeze a thread and allow it to continue execution | ||
Line 68: | Line 47: | ||
* [[Core Function ThreadExists|ThreadExists( <name> )]] -- Check if a thread exists by this name | * [[Core Function ThreadExists|ThreadExists( <name> )]] -- Check if a thread exists by this name | ||
* [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code | * [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code | ||
− | |||
* [[Core Function Threads|Threads( )]] -- Return an array of all threads | * [[Core Function Threads|Threads( )]] -- Return an array of all threads | ||
==== Variable Type Conversions ==== | ==== Variable Type Conversions ==== | ||
− | |||
* [[Core Function Char|Char( <expression> )]] -- Returns the single letter representation of an expression | * [[Core Function Char|Char( <expression> )]] -- Returns the single letter representation of an expression | ||
* [[Core Function Byte|Byte( <expression> )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression | * [[Core Function Byte|Byte( <expression> )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression | ||
Line 89: | Line 66: | ||
* [[Core Function UInt64|UInt64( <expression> )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression | * [[Core Function UInt64|UInt64( <expression> )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression | ||
* [[Core Function ULong|ULong( <expression> )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression | * [[Core Function ULong|ULong( <expression> )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function Float|Float( <expression> )]] -- Returns the 32-bit floating point representation of an expression | * [[Core Function Float|Float( <expression> )]] -- Returns the 32-bit floating point representation of an expression | ||
* [[Core Function Double|Double( <expression> )]] -- Returns the 64-bit floating point representation of an expression | * [[Core Function Double|Double( <expression> )]] -- Returns the 64-bit floating point representation of an expression | ||
* [[Core Function String|String( <expression> )]] -- Returns the String representation of an expression | * [[Core Function String|String( <expression> )]] -- Returns the String representation of an expression | ||
− | |||
− | |||
==== Common Variable Functions ==== | ==== Common Variable Functions ==== | ||
===== Misc ===== | ===== Misc ===== | ||
− | |||
* [[Core Function Unset|Unset( $variable )]] -- Delete a variable | * [[Core Function Unset|Unset( $variable )]] -- Delete a variable | ||
− | + | * [[Core Function IsDeclared|IsDeclared( <variable name> )]] -- Check if a variable has been declared | |
− | * [[Core Function IsDeclared|IsDeclared( <variable name | + | |
− | * [[Core Function | + | ===== Hash/Array ===== |
− | * [[Core Function | + | * [[Core Function Reset|Reset( $variable )]] -- Reset the current array pointer to the first element |
− | + | * [[Core Function Next|Next( $variable )]] -- Set the array pointer to the next element | |
− | + | * [[Core Function Prev|Prev( $variable )]] -- Set the array pointer to the previous element | |
− | * [[Core Function | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===== Type Checking ===== | ===== Type Checking ===== | ||
− | |||
* [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type | * [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type | ||
− | |||
* [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type | * [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type | ||
* [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type | * [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type | ||
Line 141: | Line 99: | ||
* [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type | * [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type | ||
* [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type | * [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type | ||
− | |||
* [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type | * [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type | * [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type | ||
* [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type | * [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type | ||
− | |||
* [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type | * [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type | ||
− | |||
* [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable | * [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable | ||
* [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array | * [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array | ||
* [[Core Function isVarObj|isVarObj( $variable, <type> )]] -- Check if a variable is an object type (This includes classes, file handles etc) | * [[Core Function isVarObj|isVarObj( $variable, <type> )]] -- Check if a variable is an object type (This includes classes, file handles etc) | ||
* [[Core Function isVarClass|isVarClass( $variable, <type> )]] -- Check if a variable's object type is a class | * [[Core Function isVarClass|isVarClass( $variable, <type> )]] -- Check if a variable's object type is a class | ||
+ | * [[Core Function isVarGUI|isVarGUI( $variable )]] -- Check if a variable's object type is a GUI | ||
+ | * [[Core Function isVarGUIObject|isVarGUIObject( $variable, <type> )]] -- Check if a variable's object type is a GUI Object (Buttons etc) | ||
* [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct | * [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct | ||
− | |||
* [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen() | * [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen() | ||
* [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect() | * [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect() | ||
* [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object | * [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object | ||
− | |||
− | |||
− | |||
====== Get Type Directly ====== | ====== Get Type Directly ====== | ||
* [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable | * [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable | ||
− | |||
* [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object) | * [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object) | ||
− | |||
* [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object) | * [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object) | ||
==== Binary Data Management Functions ==== | ==== Binary Data Management Functions ==== | ||
− | * [[Core Function | + | * [[Core Function Pack|Pack( <expression>, <expressions> )]] -- Pack data into a binary array |
+ | * [[Core Function Unpack|Unpack( <expression>, <binary-array> )]] -- Unpack data from a binary array | ||
* [[Core Function BinaryCreate|BinaryCreate( <size>, <fill> )]] -- Create a new binary variable and its array size and fill data type | * [[Core Function BinaryCreate|BinaryCreate( <size>, <fill> )]] -- Create a new binary variable and its array size and fill data type | ||
* [[Core Function BinaryClone|BinaryClone( <binary-array> )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one | * [[Core Function BinaryClone|BinaryClone( <binary-array> )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one | ||
− | + | * [[Core Function BinaryWipe|BinaryWipe( <binary-array> )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing just 0 | |
− | + | ||
− | * [[Core Function BinaryWipe|BinaryWipe( <binary-array> )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing | + | |
− | + | ||
* [[Core Function BinaryStr|BinaryStr( <binary-array>, <separator> )]] -- Create a Hex string from a binary array | * [[Core Function BinaryStr|BinaryStr( <binary-array>, <separator> )]] -- Create a Hex string from a binary array | ||
− | * [[Core Function BinaryHex|BinaryHex( <expression | + | * [[Core Function BinaryHex|BinaryHex( <expression> )]] -- Create a binary array from a hex string |
− | * [[Core Function BinaryLen|BinaryLen( <binary-array | + | * [[Core Function BinaryLen|BinaryLen( <binary-array> )]] -- Returns the number of bytes in a binary variable |
* [[Core Function BinaryGet|BinaryGet( <binary-array>, <index> )]] -- Get the byte at an index of a binary variable | * [[Core Function BinaryGet|BinaryGet( <binary-array>, <index> )]] -- Get the byte at an index of a binary variable | ||
* [[Core Function BinarySet|BinarySet( <binary-array>, <index>, <value> )]] -- Set the byte at an index of a binary variable | * [[Core Function BinarySet|BinarySet( <binary-array>, <index>, <value> )]] -- Set the byte at an index of a binary variable | ||
* [[Core Function BinaryReverse|BinaryReverse( <binary-array>, <start>, <length> )]] -- Reverse the order bytes a binary variable | * [[Core Function BinaryReverse|BinaryReverse( <binary-array>, <start>, <length> )]] -- Reverse the order bytes a binary variable | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function BinaryMid|BinaryMid( <binary-array>, <start>, <length> )]] -- Create a binary variable by extracting a number of bytes from another binary variable | * [[Core Function BinaryMid|BinaryMid( <binary-array>, <start>, <length> )]] -- Create a binary variable by extracting a number of bytes from another binary variable | ||
− | |||
− | |||
− | |||
* [[Core Function BinaryAppend|BinaryAppend( <binary-array>, <binary-array2>, <flag> )]] -- Append a binary variables data onto the end or beginning of another binary variables data | * [[Core Function BinaryAppend|BinaryAppend( <binary-array>, <binary-array2>, <flag> )]] -- Append a binary variables data onto the end or beginning of another binary variables data | ||
− | * [[Core Function BinaryInsert|BinaryInsert( <binary-array>, <binary-array2>, <index | + | * [[Core Function BinaryInsert|BinaryInsert( <binary-array>, <binary-array2>, <index> )]] -- Insert a binary variables data into another binary variable at a specific location |
* [[Core Function BinaryUnshift|BinaryUnshift( <binary-array>, <byte> )]] -- Add a byte to the beginning of a binary variable | * [[Core Function BinaryUnshift|BinaryUnshift( <binary-array>, <byte> )]] -- Add a byte to the beginning of a binary variable | ||
* [[Core Function BinaryPush|BinaryPush( <binary-array>, <byte> )]] -- Add a byte to the end of a binary variable | * [[Core Function BinaryPush|BinaryPush( <binary-array>, <byte> )]] -- Add a byte to the end of a binary variable | ||
Line 208: | Line 139: | ||
* [[Core Function BinaryPop|BinaryPop( <binary-array> )]] -- Delete the last byte from a binary variable | * [[Core Function BinaryPop|BinaryPop( <binary-array> )]] -- Delete the last byte from a binary variable | ||
* [[Core Function BinaryResize|BinaryResize( <binary-array>, <size>, <data> )]] -- Resize a binary variables data array | * [[Core Function BinaryResize|BinaryResize( <binary-array>, <size>, <data> )]] -- Resize a binary variables data array | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function BinaryCompress|BinaryCompress( <binary-array> )]] -- Compress a binary variables data | * [[Core Function BinaryCompress|BinaryCompress( <binary-array> )]] -- Compress a binary variables data | ||
* [[Core Function BinaryUncompress|BinaryUncompress( <binary-array> )]] -- Uncompress a binary variable data | * [[Core Function BinaryUncompress|BinaryUncompress( <binary-array> )]] -- Uncompress a binary variable data | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function BinarySave|BinarySave( <binary-array>, <file>, <flag> )]] -- Save a binary variable data to file | * [[Core Function BinarySave|BinarySave( <binary-array>, <file>, <flag> )]] -- Save a binary variable data to file | ||
* [[Core Function BinaryLoad|BinaryLoad( <file>, <flag> )]] -- Create a new binary variable by loading binary data from a file | * [[Core Function BinaryLoad|BinaryLoad( <file>, <flag> )]] -- Create a new binary variable by loading binary data from a file | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Math Functions ==== | ==== Math Functions ==== | ||
Line 320: | Line 150: | ||
* [[Core Function ATan|ATan( <expression> )]] -- Calculates the arctangent of a number | * [[Core Function ATan|ATan( <expression> )]] -- Calculates the arctangent of a number | ||
* [[Core Function ATan2|ATan2( <expression>, <expression2> )]] -- Compute arc tangent with two parameters | * [[Core Function ATan2|ATan2( <expression>, <expression2> )]] -- Compute arc tangent with two parameters | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function BitAND|BitAND( <expression>, <expression2>, <n> )]] -- Performs a bitwise AND operation | * [[Core Function BitAND|BitAND( <expression>, <expression2>, <n> )]] -- Performs a bitwise AND operation | ||
* [[Core Function BitNOT|BitNOT( <expression> )]] -- Performs a bitwise NOT operation | * [[Core Function BitNOT|BitNOT( <expression> )]] -- Performs a bitwise NOT operation | ||
* [[Core Function BitOR|BitOR( <expression>, <expression2>, <n> )]] -- Performs a bitwise OR operation | * [[Core Function BitOR|BitOR( <expression>, <expression2>, <n> )]] -- Performs a bitwise OR operation | ||
* [[Core Function BitSHIFT|BitSHIFT( <value>, <shift> )]] -- Performs a bit shifting operation | * [[Core Function BitSHIFT|BitSHIFT( <value>, <shift> )]] -- Performs a bit shifting operation | ||
− | |||
* [[Core Function BitXOR|BitXOR( <expression>, <expression2>, <n> )]] -- Performs a bitwise exclusive OR (XOR) operation | * [[Core Function BitXOR|BitXOR( <expression>, <expression2>, <n> )]] -- Performs a bitwise exclusive OR (XOR) operation | ||
− | |||
− | |||
* [[Core Function Ceiling|Ceiling( <expression> )]] -- Returns a number rounded up to the next integer | * [[Core Function Ceiling|Ceiling( <expression> )]] -- Returns a number rounded up to the next integer | ||
− | |||
* [[Core Function Cos|Cos( <expression> )]] -- Calculates the cosine of a number | * [[Core Function Cos|Cos( <expression> )]] -- Calculates the cosine of a number | ||
* [[Core Function Cosh|Cosh( <expression> )]] -- Returns the hyperbolic cosine of the specified angle | * [[Core Function Cosh|Cosh( <expression> )]] -- Returns the hyperbolic cosine of the specified angle | ||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function Exp|Exp( <expression> )]] -- Returns e raised to the specified power | * [[Core Function Exp|Exp( <expression> )]] -- Returns e raised to the specified power | ||
* [[Core Function Floor|Floor( <expression> )]] -- Returns the largest integer less than or equal to the specified number | * [[Core Function Floor|Floor( <expression> )]] -- Returns the largest integer less than or equal to the specified number | ||
− | + | * [[Core Function Log|Log( <expression> )]] -- Returns the logarithm of a specified number | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * [[Core Function Log|Log( <expression | + | |
* [[Core Function Log10|Log10( <expression> )]] -- Returns the common (base-10) logarithm of a specified number | * [[Core Function Log10|Log10( <expression> )]] -- Returns the common (base-10) logarithm of a specified number | ||
* [[Core Function Math|Math( <expression> )]] -- Parse a string containing mathematical equations | * [[Core Function Math|Math( <expression> )]] -- Parse a string containing mathematical equations | ||
Line 361: | Line 166: | ||
* [[Core Function Min|Min( <expression>, <expression2> )]] -- Find the lesser number and return it | * [[Core Function Min|Min( <expression>, <expression2> )]] -- Find the lesser number and return it | ||
* [[Core Function Mod|Mod( <expression>, <expression2> )]] -- Performs the modulus operation | * [[Core Function Mod|Mod( <expression>, <expression2> )]] -- Performs the modulus operation | ||
− | |||
− | |||
− | |||
* [[Core Function Pow|Pow( <expression>, <expression2> )]] -- Returns a specified number raised to the specified power | * [[Core Function Pow|Pow( <expression>, <expression2> )]] -- Returns a specified number raised to the specified power | ||
− | + | * [[Core Function Random|Random( <expression>, <expression2> )]] -- Get a random number from the defined area. | |
− | + | ||
− | + | ||
− | * [[Core Function Random|Random( < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Round|Round( <expression>, <decimalplaces> )]] -- Returns a number rounded to a specified number of decimal places | * [[Core Function Round|Round( <expression>, <decimalplaces> )]] -- Returns a number rounded to a specified number of decimal places | ||
− | |||
* [[Core Function Sin|Sin( <expression> )]] -- Returns the sine of the specified angle | * [[Core Function Sin|Sin( <expression> )]] -- Returns the sine of the specified angle | ||
* [[Core Function Sinh|Sinh( <expression> )]] -- Returns the hyperbolic sine of the specified angle | * [[Core Function Sinh|Sinh( <expression> )]] -- Returns the hyperbolic sine of the specified angle | ||
− | |||
* [[Core Function Sqrt|Sqrt( <expression> )]] -- Returns the square root of a specified number | * [[Core Function Sqrt|Sqrt( <expression> )]] -- Returns the square root of a specified number | ||
− | |||
* [[Core Function Tan|Tan( <expression> )]] -- Returns the tangent of the specified angle | * [[Core Function Tan|Tan( <expression> )]] -- Returns the tangent of the specified angle | ||
* [[Core Function Tanh|Tanh( <expression> )]] -- Returns the hyperbolic tangent of the specified angle | * [[Core Function Tanh|Tanh( <expression> )]] -- Returns the hyperbolic tangent of the specified angle | ||
* [[Core Function Truncate|Truncate( <expression> )]] -- Calculates the integral part of a specified decimal number | * [[Core Function Truncate|Truncate( <expression> )]] -- Calculates the integral part of a specified decimal number | ||
− | |||
− | |||
− | |||
− | |||
==== String Functions ==== | ==== String Functions ==== | ||
− | + | * [[Core Function Asc|Asc( <char> )]] -- Returns the ASCII code of a character. | |
− | + | * [[Core Function AscW|AscW( <char> )]] -- Returns the UNICODE code of a character. | |
− | * [[Core Function Asc|Asc( <char> )]] -- Returns the ASCII code of a character | + | * [[Core Function Chr|Chr( <expression> )]] -- Returns a character corresponding to an ASCII code. |
− | * [[Core Function AscW|AscW( <char> )]] -- Returns the UNICODE code of a character | + | * [[Core Function ChrW|ChrW( <expression> )]] -- Returns a character corresponding to a UNICODE code. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * [[Core Function Chr|Chr( <expression> )]] -- Returns a character corresponding to an ASCII code | + | |
− | * [[Core Function ChrW|ChrW( <expression> )]] -- Returns a character corresponding to | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Contains|Contains( <srting>, <string>, <casesense>)]] -- Check if string contains a sub string | * [[Core Function Contains|Contains( <srting>, <string>, <casesense>)]] -- Check if string contains a sub string | ||
− | + | * [[Core Function CSV|CSV( <string>, <delim>, <quote>, <comment> )]] -- Split strings and parse a CSV text into an array | |
− | + | ||
− | * [[Core Function CSV|CSV( <string>, <delim>, <quote | + | |
− | + | ||
* [[Core Function Dec|Dec( <expression> )]] -- Returns a integer representation of a hexadecimal string | * [[Core Function Dec|Dec( <expression> )]] -- Returns a integer representation of a hexadecimal string | ||
* [[Core Function FDec|FDec( <expression> )]] -- Returns a float representation of a hexadecimal string | * [[Core Function FDec|FDec( <expression> )]] -- Returns a float representation of a hexadecimal string | ||
Line 423: | Line 188: | ||
* [[Core Function DecPad|DecPad( <expression>, <count> )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros) | * [[Core Function DecPad|DecPad( <expression>, <count> )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros) | ||
* [[Core Function DecryptString|DecryptString( <expression>, <password> )]] -- Decrypt a string with a given password | * [[Core Function DecryptString|DecryptString( <expression>, <password> )]] -- Decrypt a string with a given password | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function EncryptString|EncryptString( <expression>, <password> )]] -- Encrypt a string with a given password | * [[Core Function EncryptString|EncryptString( <expression>, <password> )]] -- Encrypt a string with a given password | ||
* [[Core Function EndsWith|EndsWith( <expression>, <expression2>, <flag> )]] -- Check if a string ends with a substring | * [[Core Function EndsWith|EndsWith( <expression>, <expression2>, <flag> )]] -- Check if a string ends with a substring | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function Hex|Hex( <expression>, <length> )]] -- Returns a string representation of an integer type converted to hexadecimal | * [[Core Function Hex|Hex( <expression>, <length> )]] -- Returns a string representation of an integer type converted to hexadecimal | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function FHex|FHex( <expression> )]] -- Returns a string representation of an float type converted to hexadecimal | * [[Core Function FHex|FHex( <expression> )]] -- Returns a string representation of an float type converted to hexadecimal | ||
* [[Core Function DHex|DHex( <expression> )]] -- Returns a string representation of an double type converted to hexadecimal | * [[Core Function DHex|DHex( <expression> )]] -- Returns a string representation of an double type converted to hexadecimal | ||
− | + | * [[Core Function InStr|InStr( <string>, <substirng>, <casesense>, <occurrence>, <start>, <count> )]] -- Checks if a string contains a given substring. | |
− | + | ||
− | + | ||
− | * [[Core Function InStr|InStr( <string>, <substirng>, <casesense>, <occurrence>, <start> )]] -- Checks if a string contains a given substring. | + | |
* [[Core Function isAlpha|isAlpha( <expression> )]] -- Checks if string contains only Alphabetic characters | * [[Core Function isAlpha|isAlpha( <expression> )]] -- Checks if string contains only Alphabetic characters | ||
* [[Core Function isAlphaNumeric|isAlphaNumeric( <expression> )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters | * [[Core Function isAlphaNumeric|isAlphaNumeric( <expression> )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters | ||
* [[Core Function isASCII|isASCII( <expression> )]] -- Check if string contains only ASCII chars | * [[Core Function isASCII|isASCII( <expression> )]] -- Check if string contains only ASCII chars | ||
− | + | * [[Core Function isEmpty|isEmpty( <expression> )]] -- Checks if a string is completely empty. | |
− | * [[Core Function isEmpty|isEmpty( <expression> )]] -- Checks if a string is completely empty | + | |
− | + | ||
− | + | ||
− | + | ||
* [[Core Function isFloat|isFloat( <expression> )]] -- Check if string contains a floating point and could be converted | * [[Core Function isFloat|isFloat( <expression> )]] -- Check if string contains a floating point and could be converted | ||
* [[Core Function isLower|isLower( <expression> )]] -- Checks if string contains only lowercase letters | * [[Core Function isLower|isLower( <expression> )]] -- Checks if string contains only lowercase letters | ||
− | * [[Core Function isNumeric|isNumeric( <expression> )]] -- Checks if string only contains numbers | + | * [[Core Function isNumeric|isNumeric( <expression> )]] -- Checks if string only contains numbers |
* [[Core Function isSpace|isSpace( <expression> )]] -- Check if string contains only whitespace | * [[Core Function isSpace|isSpace( <expression> )]] -- Check if string contains only whitespace | ||
* [[Core Function isSymbol|isSymbol( <expression> )]] -- Check if string contains only symbol chars | * [[Core Function isSymbol|isSymbol( <expression> )]] -- Check if string contains only symbol chars | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function isUpper|isUpper( <expression> )]] -- Check if string contains only uppercase chars | * [[Core Function isUpper|isUpper( <expression> )]] -- Check if string contains only uppercase chars | ||
* [[Core Function isXDigit|isXDigit( <expression> )]] -- Check if string contains only hex chars | * [[Core Function isXDigit|isXDigit( <expression> )]] -- Check if string contains only hex chars | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function LC|LC( <expression> )]] -- Returns string in all lower case | * [[Core Function LC|LC( <expression> )]] -- Returns string in all lower case | ||
* [[Core Function LCFirst|LCFirst( <expression> )]] -- Lower Cases first letter of string | * [[Core Function LCFirst|LCFirst( <expression> )]] -- Lower Cases first letter of string | ||
Line 486: | Line 210: | ||
* [[Core Function LCWords|LCWords( <expression> )]] -- Lower Cases first letter of each word in string | * [[Core Function LCWords|LCWords( <expression> )]] -- Lower Cases first letter of each word in string | ||
* [[Core Function Left|Left( <expression>, <count> )]] -- Returns a number of characters from the left-hand side of a string | * [[Core Function Left|Left( <expression>, <count> )]] -- Returns a number of characters from the left-hand side of a string | ||
− | + | * [[Core Function Match|Match( <expression>, <charset> )]] -- Check if a string contains only characters from a substring | |
− | * [[Core Function Match|Match( < | + | |
− | + | ||
* [[Core Function MD5|MD5( <expression> )]] -- Creates MD5 Hash of specified string | * [[Core Function MD5|MD5( <expression> )]] -- Creates MD5 Hash of specified string | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function PadLeft|PadLeft( <expression>, <pad>, <count> )]] -- Pad the left of a string a given number of times with another string | * [[Core Function PadLeft|PadLeft( <expression>, <pad>, <count> )]] -- Pad the left of a string a given number of times with another string | ||
* [[Core Function PadRight|PadRight( <expression>, <pad>, <count> )]] -- Pad the right of a string a given number of times with another string | * [[Core Function PadRight|PadRight( <expression>, <pad>, <count> )]] -- Pad the right of a string a given number of times with another string | ||
− | + | * [[Core Function RandStr|RandStr( <count> )]] -- Generate a random sequence of characters at a given length | |
− | + | ||
− | * [[Core Function RandStr|RandStr( <count | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Repeat|Repeat( <expression>, <count>, <flag> )]] -- Create a new string or new array containing repeats of a string provided | * [[Core Function Repeat|Repeat( <expression>, <count>, <flag> )]] -- Create a new string or new array containing repeats of a string provided | ||
* [[Core Function Replace|Replace( <expression>, <find>, <replace>, <case-sensitive-flag> )]] -- Replace substrings within a string with other strings | * [[Core Function Replace|Replace( <expression>, <find>, <replace>, <case-sensitive-flag> )]] -- Replace substrings within a string with other strings | ||
* [[Core Function Reverse|Reverse( <expression> )]] -- Reverse all characters in a string | * [[Core Function Reverse|Reverse( <expression> )]] -- Reverse all characters in a string | ||
− | |||
* [[Core Function Right|Right( <expression>, <count> )]] -- Returns a number of characters from the right-hand side of a string | * [[Core Function Right|Right( <expression>, <count> )]] -- Returns a number of characters from the right-hand side of a string | ||
− | |||
− | |||
* [[Core Function SHA1|SHA1( <expression> )]] -- Returns SHA1 hash of string | * [[Core Function SHA1|SHA1( <expression> )]] -- Returns SHA1 hash of string | ||
− | |||
* [[Core Function Split|Split( <expression>, <delim/pattern>, <flag> )]] -- Splits up a string into substrings depending on the given delimiters. | * [[Core Function Split|Split( <expression>, <delim/pattern>, <flag> )]] -- Splits up a string into substrings depending on the given delimiters. | ||
− | * [[Core Function SPrintf|SPrintf( < | + | * [[Core Function SPrintf|SPrintf( <expression>, <expressions>... )]] -- Create a formatted string |
* [[Core Function StartsWith|StartsWith( <expression>, <expression2>, <flag> )]] -- Check if a string starts with a substring | * [[Core Function StartsWith|StartsWith( <expression>, <expression2>, <flag> )]] -- Check if a string starts with a substring | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function StrInsert|StrInsert( <expression>, <index>, <expression2> )]] -- Insert a string at a given index of another string and return the new string | * [[Core Function StrInsert|StrInsert( <expression>, <index>, <expression2> )]] -- Insert a string at a given index of another string and return the new string | ||
− | * [[Core Function StrIndex|StrIndex( <expression>, <index | + | * [[Core Function StrIndex|StrIndex( <expression>, <index> )]] -- Get or set a char from/to a string at a specific index |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function StrLen|StrLen( <expression> )]] -- Returns length of specified string | * [[Core Function StrLen|StrLen( <expression> )]] -- Returns length of specified string | ||
− | * [[Core Function SubStr|SubStr | + | * [[Core Function SubStr|SubStr( <expression>, <start>, <end> )]] -- Return part of a string |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Trim|Trim( <expression>, <chars> )]] -- Removes whitespace from the beginning and end of a string | * [[Core Function Trim|Trim( <expression>, <chars> )]] -- Removes whitespace from the beginning and end of a string | ||
* [[Core Function TrimLeft|TrimLeft( <expression>, <chars> )]] -- Strip whitespace from the start of a string | * [[Core Function TrimLeft|TrimLeft( <expression>, <chars> )]] -- Strip whitespace from the start of a string | ||
Line 552: | Line 234: | ||
* [[Core Function UCLast|UCLast( <expression> )]] -- Upper Cases last letter of string | * [[Core Function UCLast|UCLast( <expression> )]] -- Upper Cases last letter of string | ||
* [[Core Function UCWords|UCWords( <expression> )]] -- Upper Cases first letter of each word in string | * [[Core Function UCWords|UCWords( <expression> )]] -- Upper Cases first letter of each word in string | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Array Functions ==== | ==== Array Functions ==== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [[Core Function Join|Join( <array>, <separator> )]] -- Join an array into a string with an optional separator | * [[Core Function Join|Join( <array>, <separator> )]] -- Join an array into a string with an optional separator | ||
− | * [[Core Function | + | * [[Core Function UBound|UBound( <array/binary-array> )]] -- Returns the size of array (How many elements it currently has stored) |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Push|Push( <array>, <expressions> )]] -- Add items to the end of an array | * [[Core Function Push|Push( <array>, <expressions> )]] -- Add items to the end of an array | ||
− | |||
* [[Core Function Insert|Insert( <array>, <id>, <expressions> )]] -- Add items to an array at a given location | * [[Core Function Insert|Insert( <array>, <id>, <expressions> )]] -- Add items to an array at a given location | ||
− | |||
− | |||
* [[Core Function Unshift|Unshift( <array>, <expressions> )]] -- Add items to the beginning of an array | * [[Core Function Unshift|Unshift( <array>, <expressions> )]] -- Add items to the beginning of an array | ||
− | + | * [[Core Function Pop|Pop( <array> )]] -- Delete the first item in an array | |
− | * [[Core Function Pop|Pop( <array> )]] -- Delete the | + | * [[Core Function Shift|Shift( <array> )]] -- Delete the last item in an array |
− | * [[Core Function Shift|Shift( <array> )]] -- Delete the | + | |
− | + | ||
* [[Core Function Remove|Remove( <array>, <start-id>, <end-id> )]] -- Delete items from an array starting at a given location and stopping at a given location | * [[Core Function Remove|Remove( <array>, <start-id>, <end-id> )]] -- Delete items from an array starting at a given location and stopping at a given location | ||
− | |||
− | |||
− | |||
− | |||
* [[Core Function IsIndexSet|IsIndexSet( <array>, <index> )]] -- Check if an element exist at a given index ID within an array | * [[Core Function IsIndexSet|IsIndexSet( <array>, <index> )]] -- Check if an element exist at a given index ID within an array | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ==== | + | ==== Hash (Dictionary) Functions ==== |
− | * [[Core Function | + | * [[Core Function Each|Each( <array> )]] -- Get hash key/value pair and return them as a 2 element array and each time the function is called get the next key/value pair |
− | + | * [[Core Function IsKeySet|IsKeySet( <array>, <key> )]] -- Check if given key exists within an array (hash/dictionary) | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * [[Core Function | + | |
− | + | ||
==== Process Functions ==== | ==== Process Functions ==== | ||
− | * [[Core Function DLLCall|DLLCall( < | + | * [[Core Function DLLCall|DLLCall( <dll>, <function>, <returntype>, <paramtypes>, <params> )]] -- Dynamically call a function in a DLL |
− | * [[Core Function | + | * [[Core Function DLLStructCreateDef|DLLStructCreateDef( <name>, <def string> )]] -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs |
− | * [[Core Function | + | * [[Core Function DLLStructCreate|DLLStructCreate( <def string> )]] -- Creates a C/C++ style structure to be used with DLLCall |
− | * [[Core Function | + | * [[Core Function DLLStructGetData|DLLStructGetData( <dllstruct>, <element>, <index> )]] -- Returns the data of an element of the struct |
− | * [[Core Function | + | * [[Core Function DLLStructSetData|DLLStructSetData( <dllstruct>, <element>, <index> )]] -- Set the data of an element of the struct |
− | * [[Core Function | + | * [[Core Function DllStructGetSize|DLLStructGetSize( <dllstruct> )]] -- Returns the size of the struct in bytes |
− | * [[Core Function | + | * [[Core Function DllStructGetPtr|DLLStructGetPtr( <dllstruct>, <element>, <index> )]] -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment |
− | * [[Core Function | + | * [[Core Function DllStructGetVars|DLLStructGetVars( <dllstruct> )]] -- Create an array of all items and their array size with total byte size |
− | * [[Core Function | + | * [[Core Function LoadAssembly|LoadAssembly( <file> )]] -- Load a .NET DLL into a variable |
+ | * [[Core Function UnloadAssembly|UnloadAssembly( <assembly> )]] -- Unload a .NET DLL from a variable | ||
+ | * [[Core Function GetMethod|GetMethod( <assembly>, <namespace>, <class>, <method>, <paramdefs>, <params> )]] -- Load an instance of a method and its container class into a variable to be able to call it | ||
+ | * [[Core Function Invoke|Invoke( <method>, <params> )]] -- Call the function obtained from GetMethod() | ||
* [[Core Function Run|Run( <file>, <arguments>, <workdir>, <flag>, <show options> )]] -- Runs an external program | * [[Core Function Run|Run( <file>, <arguments>, <workdir>, <flag>, <show options> )]] -- Runs an external program | ||
* [[Core Function RunWait|RunWait( <file>, <timeout>, <arguments>, <workdir>, <flag>, <show options> )]] -- Runs an external program and waits until the program finishes | * [[Core Function RunWait|RunWait( <file>, <timeout>, <arguments>, <workdir>, <flag>, <show options> )]] -- Runs an external program and waits until the program finishes | ||
− | |||
− | |||
* [[Core Function RunAsSet|RunAsSet( <user>, <domain>, <password>, <options> )]] -- Initialise a set of user credentials to use during Run and RunWait operations. | * [[Core Function RunAsSet|RunAsSet( <user>, <domain>, <password>, <options> )]] -- Initialise a set of user credentials to use during Run and RunWait operations. | ||
− | |||
− | |||
* [[Core Function ProcessClose|ProcessClose( <pid/name> )]] -- Terminates a named process | * [[Core Function ProcessClose|ProcessClose( <pid/name> )]] -- Terminates a named process | ||
− | |||
* [[Core Function ProcessExists|ProcessExists( <pid/name> )]] -- Checks to see if a specified process exists | * [[Core Function ProcessExists|ProcessExists( <pid/name> )]] -- Checks to see if a specified process exists | ||
* [[Core Function ProcessList|ProcessList( <name> )]] -- Returns an array listing the currently running processes (names and PIDs) | * [[Core Function ProcessList|ProcessList( <name> )]] -- Returns an array listing the currently running processes (names and PIDs) | ||
Line 670: | Line 286: | ||
* [[Core Function FileOpen|FileOpen( <FileName>, <flag> )]] -- Opens a file for reading or writing | * [[Core Function FileOpen|FileOpen( <FileName>, <flag> )]] -- Opens a file for reading or writing | ||
* [[Core Function FileClose|FileClose( <file> )]] -- Closes a previously opened file | * [[Core Function FileClose|FileClose( <file> )]] -- Closes a previously opened file | ||
− | * [[Core Function FileWrite|FileWrite( <file>, <expression | + | * [[Core Function FileWrite|FileWrite( <file>, <expression> )]] -- Write text to previously opened file at the current File Steam pointer location |
* [[Core Function FileWriteBinary|FileWriteBinary( <file>, <binary-array> )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location | * [[Core Function FileWriteBinary|FileWriteBinary( <file>, <binary-array> )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location | ||
− | * [[Core Function FileAppend|FileAppend( <file>, <expression | + | * [[Core Function FileAppend|FileAppend( <file>, <expression> )]] -- Append a line of text to the end of a previously opened text file |
* [[Core Function FileAppendBinary|FileAppendBinary( <file>, <binary-array> )]] -- Append the data from a binary variable to the end of a previously opened file | * [[Core Function FileAppendBinary|FileAppendBinary( <file>, <binary-array> )]] -- Append the data from a binary variable to the end of a previously opened file | ||
* [[Core Function FileSeek|FileSeek( <file>, <offset>, <flag> )]] -- Change the POSITION of the File Stream pointer | * [[Core Function FileSeek|FileSeek( <file>, <offset>, <flag> )]] -- Change the POSITION of the File Stream pointer | ||
* [[Core Function FilePos|FilePos( <file> )]] -- Get the current POSITION of the File Stream pointer | * [[Core Function FilePos|FilePos( <file> )]] -- Get the current POSITION of the File Stream pointer | ||
− | * [[Core Function FileRead|FileRead( <file>, <expression> )]] -- Read a number of | + | * [[Core Function FileRead|FileRead( <file>, <expression> )]] -- Read a number of characters from a previously opened text file starting from current File Steam pointer location |
− | * [[Core Function FileReadBinary|FileReadBinary( <file>, <expression> )]] -- Read a number of bytes from a file starting from current File Steam pointer location | + | * [[Core Function FileReadBinary|FileReadBinary( <file>, <expression> )]] -- Read a number of bytes from a previously opened file starting from current File Steam pointer location |
− | * [[Core Function FileReadLine|FileReadLine( <file>, <expression> )]] -- Read a line of text from a text file (Or specify a name of a file) | + | * [[Core Function FileReadLine|FileReadLine( <file>, <expression> )]] -- Read a line of text from a previously opened text file (Or specify a name of a file) |
− | * [[Core Function FileReadLines|FileReadLines( <file> )]] -- Read all lines of text from a text file (Or specify a name of a file) | + | * [[Core Function FileReadLines|FileReadLines( <file> )]] -- Read all lines of text from a previously opened text file (Or specify a name of a file) |
− | * [[Core Function FileSave|FileSave( <file>, <expression | + | * [[Core Function FileSave|FileSave( <file>, <expression> )]] -- Save all text to a file |
* [[Core Function FileLoad|FileLoad( <file> )]] -- Load all text from a file | * [[Core Function FileLoad|FileLoad( <file> )]] -- Load all text from a file | ||
===== Misc ===== | ===== Misc ===== | ||
− | |||
* [[Core Function FileCopy|FileCopy( <file1>, <file2>, <flag> )]] -- Copy a file | * [[Core Function FileCopy|FileCopy( <file1>, <file2>, <flag> )]] -- Copy a file | ||
* [[Core Function FileDelete|FileDelete( <file> )]] -- Delete a file | * [[Core Function FileDelete|FileDelete( <file> )]] -- Delete a file | ||
Line 695: | Line 310: | ||
* [[Core Function FileMD5|FileMD5( <file> )]] -- Calculate the MD5 checksum of a file | * [[Core Function FileMD5|FileMD5( <file> )]] -- Calculate the MD5 checksum of a file | ||
* [[Core Function FileSHA1|FileSHA1( <file> )]] -- Calculate the SHA1 checksum of a file | * [[Core Function FileSHA1|FileSHA1( <file> )]] -- Calculate the SHA1 checksum of a file | ||
− | |||
− | |||
− | |||
− | |||
− | |||
===== Dialogs ===== | ===== Dialogs ===== | ||
Line 708: | Line 318: | ||
* [[Core Function GetFiles|GetFiles ( <path>, <pattern> )]] -- Get an array of all files in a directory | * [[Core Function GetFiles|GetFiles ( <path>, <pattern> )]] -- Get an array of all files in a directory | ||
* [[Core Function GetFolders|GetFolders ( <path>, <pattern> )]] -- Get an array of all folders in a directory | * [[Core Function GetFolders|GetFolders ( <path>, <pattern> )]] -- Get an array of all folders in a directory | ||
− | |||
* [[Core Function MKDir|MKDir ( <path> )]] -- Creates all directories and subdirectories as specified by path | * [[Core Function MKDir|MKDir ( <path> )]] -- Creates all directories and subdirectories as specified by path | ||
* [[Core Function RMDir|RMDir ( <path>, <flag> )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory | * [[Core Function RMDir|RMDir ( <path>, <flag> )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory | ||
* [[Core Function DirExists|DirExists ( <path> )]] -- Determines whether the given path refers to an existing directory on disk | * [[Core Function DirExists|DirExists ( <path> )]] -- Determines whether the given path refers to an existing directory on disk | ||
* [[Core Function DirCopy|DirCopy ( <sourcepath>, <destpath> )]] -- Copies a directory and all sub-directories and files (Similar to xcopy) | * [[Core Function DirCopy|DirCopy ( <sourcepath>, <destpath> )]] -- Copies a directory and all sub-directories and files (Similar to xcopy) | ||
− | |||
− | |||
− | |||
− | |||
===== Dialogs ===== | ===== Dialogs ===== | ||
Line 722: | Line 327: | ||
==== Path Functions ==== | ==== Path Functions ==== | ||
− | |||
* [[Core Function HasExtension|HasExtension ( <path> )]] -- Determines whether a path includes a file name extension | * [[Core Function HasExtension|HasExtension ( <path> )]] -- Determines whether a path includes a file name extension | ||
* [[Core Function GetFullPath|GetFullPath ( <path> )]] -- Returns the absolute path for the specified path string | * [[Core Function GetFullPath|GetFullPath ( <path> )]] -- Returns the absolute path for the specified path string | ||
Line 731: | Line 335: | ||
* [[Core Function GetPathRoot|GetPathRoot ( <path> )]] -- Gets the root directory information of the specified path | * [[Core Function GetPathRoot|GetPathRoot ( <path> )]] -- Gets the root directory information of the specified path | ||
* [[Core Function IsPathRooted|IsPathRooted ( <path> )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information | * [[Core Function IsPathRooted|IsPathRooted ( <path> )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information | ||
− | |||
==== Network Functions ==== | ==== Network Functions ==== | ||
===== HTTP Functions ===== | ===== HTTP Functions ===== | ||
− | * [[Core Function HTTPFileExists|HTTPFileExists( < | + | * [[Core Function HTTPFileExists|HTTPFileExists( <not available> )]] -- Check if a file exists at a given URL |
− | * [[Core Function HTTPGetString|HTTPGetString( < | + | * [[Core Function HTTPGetString|HTTPGetString( <not available> )]] -- Copy all text from a URL and return it as a string |
− | + | ||
===== MySQL Functions ===== | ===== MySQL Functions ===== | ||
Line 754: | Line 356: | ||
* [[Core Function SSListen|SSListen( <port>, <max connections>, <name> )]] -- Create a server and begin listening for clients to connect | * [[Core Function SSListen|SSListen( <port>, <max connections>, <name> )]] -- Create a server and begin listening for clients to connect | ||
* [[Core Function SSConnect|SSConnect( <ip>, <port>, <connection string>, <name> )]] -- Connect to a server | * [[Core Function SSConnect|SSConnect( <ip>, <port>, <connection string>, <name> )]] -- Connect to a server | ||
− | * [[Core Function SSApprove|SSApprove( <client socket> )]] -- Approve a client to connect to the server | + | * [[Core Function SSApprove|SSApprove( <server>, <client socket> )]] -- Approve a client to connect to the server |
− | * [[Core Function SSDisapprove|SSDisapprove( <client socket> )]] -- Disapprove a client to connect to the server | + | * [[Core Function SSDisapprove|SSDisapprove( <server>, <client socket> )]] -- Disapprove a client to connect to the server |
− | * [[Core Function SSClientStatus|SSClientStatus( | + | * [[Core Function SSClientStatus|SSClientStatus( /* depends... /* )]] -- Get the status of a client or of our client |
− | * [[Core Function SSClientIP|SSClientIP( <client socket> )]] -- Get the IP of a client socket | + | * [[Core Function SSClientIP|SSClientIP( <server>, <client socket> )]] -- Get the IP of a client socket |
* [[Core Function SSRecv|SSRecv( <server/client> )]] -- Check for a message recieved from client/server | * [[Core Function SSRecv|SSRecv( <server/client> )]] -- Check for a message recieved from client/server | ||
− | * [[Core Function SSRead|SSRead( < | + | * [[Core Function SSRead|SSRead( <message buffer>, <data type> )]] -- Read data from a message |
− | * [[Core Function SSDrop|SSDrop( < | + | * [[Core Function SSDrop|SSDrop( <server>, <client socket> )]] -- Kick a client off the server |
+ | * [[Core Function SSSendBufferCreate|SSSendBufferCreate( <server/client> )]] -- Create a new buffer to store data to send to the client/server | ||
+ | * [[Core Function SSSendBufferAppend|SSSendBufferAppend( <message buffer>, <type>, <data> )]] -- Add data to the buffer to send such as Strings etc | ||
* [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server | * [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===== Misc Network Functions ===== | ===== Misc Network Functions ===== | ||
Line 792: | Line 374: | ||
* [[Core Function WriteMem|WriteMem( < Caption / PID >, <Class>, <Address>, <value> )]] -- Write a value to an address in an application's memory (Supports multiple values and even binary variables for writing multiple bytes) | * [[Core Function WriteMem|WriteMem( < Caption / PID >, <Class>, <Address>, <value> )]] -- Write a value to an address in an application's memory (Supports multiple values and even binary variables for writing multiple bytes) | ||
* [[Core Function ReadMem|ReadMem( < Caption / PID >, <Class>, <Address>, <defs>, <size> )]] -- Read bytes from an application's memory at an address and create variables using same defs and return values as Unpack() | * [[Core Function ReadMem|ReadMem( < Caption / PID >, <Class>, <Address>, <defs>, <size> )]] -- Read bytes from an application's memory at an address and create variables using same defs and return values as Unpack() | ||
− | * [[Core Function Alloc|Alloc( <size>, < | + | * [[Core Function Alloc|Alloc( <size>, <flag> )]] -- Allocate memory and return the pointer to it |
− | + | ||
* [[Core Function Free|Free( <ptr> )]] -- Deallocate memory from a pointer | * [[Core Function Free|Free( <ptr> )]] -- Deallocate memory from a pointer | ||
* [[Core Function StringToPTR|StringToPTR( <type>, <string> )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory | * [[Core Function StringToPTR|StringToPTR( <type>, <string> )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory | ||
Line 799: | Line 380: | ||
* [[Core Function PTRRead|PTRRead( <ptr>, <type>, <offset> )]] -- Read data from a memory pointer optionally starting from a given index | * [[Core Function PTRRead|PTRRead( <ptr>, <type>, <offset> )]] -- Read data from a memory pointer optionally starting from a given index | ||
* [[Core Function PTRWrite|PTRWrite( <ptr>, <type>, <offset>, <value> )]] -- Write data to a memory pointer optionally starting from a given index | * [[Core Function PTRWrite|PTRWrite( <ptr>, <type>, <offset>, <value> )]] -- Write data to a memory pointer optionally starting from a given index | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== GUI Functions ==== | ==== GUI Functions ==== | ||
===== Dialog Creation Functions ===== | ===== Dialog Creation Functions ===== | ||
− | + | * [[Core Function GUICreate|GUICreate( <Title>, <Width>, <Height>, <Left>, <Top> )]] -- Create new GUI window | |
− | * [[Core Function GUICreate|GUICreate( | + | * [[Core Function DoEvents|DoEvents( )]] -- Keep GUI window active by dispatching all messages in the queue |
− | * [[Core Function DoEvents|DoEvents( )]] -- Keep GUI | + | |
− | * [[Core Function | + | ===== Dialog Properties Get/Set Functions ===== |
− | * [[Core Function | + | * [[Core Function GUIState|GUIState( <expression> )]] -- Gets current GUI state |
− | + | * [[Core Function GUISetState|GUISetState( <expression> )]] -- Sets GUI state | |
===== Control Creation Functions ===== | ===== Control Creation Functions ===== | ||
− | * [[Core Function GUICreateButton| | + | * [[Core Function GUICreateButton|GUICreateButton( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a button |
− | + | * [[Core Function GUICreateTextBox|GUICreateTextBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a Textbox | |
− | * [[Core Function | + | * [[Core Function GUICreateTextBoxEx|GUICreateTextBoxEx( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a multiline Textbox |
− | + | * [[Core Function GUICreatePassword|GUICreatePassword( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a Passweord Box | |
− | * [[Core Function | + | * [[Core Function GUICreateLabel|GUICreateLabel( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a Label |
− | + | * [[Core Function GUICreateCheckBox|GUICreateCheckBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a CheckBox | |
− | + | * [[Core Function GUICreateTimer|GUICreateTimer( <gui/container>, <name>, <interval> )]] -- Create a timer | |
− | * [[Core Function | + | * [[Core Function GUICreateDataGrid|GUICreateDataGrid( <gui/container>, <name>, <left>, <top>, <width>, <height> )]] -- Create a Data Grid |
− | + | * [[Core Function GUICreateGroupBox|GUICreateGroupBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> )]] -- Create a GroupBox | |
− | * [[Core Function | + | * [[Core Function GUICreateTabSheet|GUICreateTabSheet( <gui/container>, <name>, <left>, <top>, <width>, <height> )]] -- Create a TabSheet |
− | + | ||
− | * [[Core Function | + | |
− | + | ||
− | + | ||
− | + | ||
− | * [[Core Function | + | |
− | * [[Core Function | + | |
− | * [[Core Function | + | |
− | + | ||
− | * [[Core Function | + | |
− | + | ||
− | + | ||
− | ===== | + | ===== Event Linking Functions ===== |
− | * [[Core Function | + | * [[Core Function GUILink|GUILink( <gui/guiobject>, <linktype> )]] -- Links an event to a GUI or GUI Object |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===== Common Dialog/Control Properties Get/Set Functions ===== | ===== Common Dialog/Control Properties Get/Set Functions ===== | ||
* [[Core Function GUIGetProp|GUIGetProp( <gui object>, <prop> )]] -- Get the value of a GUI objects property | * [[Core Function GUIGetProp|GUIGetProp( <gui object>, <prop> )]] -- Get the value of a GUI objects property | ||
* [[Core Function GUISetProp|GUISetProp( <gui object>, <prop>, <value> )]] -- Set the value of a GUI objects property | * [[Core Function GUISetProp|GUISetProp( <gui object>, <prop>, <value> )]] -- Set the value of a GUI objects property | ||
− | * [[Core Function | + | ===== Common Dialog/Control Method Functions ===== |
+ | * [[Core Function GUIPropInvoke|GUIPropInvoke( <gui/gui object>, <method> )]] -- Invoke a method of the GUI/GUIObject such as Focus() | ||
− | ===== | + | ===== GUIGetProp & GUISetProp Examples ===== |
− | * [[ | + | Here are some GUIGetProp & GUISetProp Examples that you might not figure out by yourself. |
+ | * [[GUI GetSet Prop Example Colour|Change colour of controls]] -- Shows how to change the background and foreground colour on Buttons, Windows etc. | ||
− | ===== | + | ===== Control Properties Get/Set Functions ===== |
− | * [[Core Function | + | * [[Core Function GUITimerStart|GUITimerStart( <timer> )]] -- Starts specified timer |
− | * [[Core Function | + | * [[Core Function GUITimerStop|GUITimerStop( <timer> )]] -- Stops specified timer |
+ | * [[Core Function GUIDataGrid|GUIDataGrid( <datagrid> )]] -- Properties & Functions specifically for Data Grid | ||
+ | * [[Core Function GUITabSheet|GUITabSheet( <tabsheet> )]] -- Properties & Functions specifically for Tab Sheet | ||
===== Other GUI Functions ===== | ===== Other GUI Functions ===== | ||
− | * [[Core Function | + | * [[Core Function GUIMsgFilter|GUIMsgFilter( <gui>, <command> )]] -- Use a function to recieve all messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM) |
− | + | * [[Core Function GUICreateFont|GUICreateFont( <name>, <size>, <style> )]] -- Create a new font for use on buttons etc | |
− | * [[Core Function | + | * [[Core Function GUIFont|GUIFont( < font >, <setting>, <value> )]] -- Change the style, size etc on a font object |
− | + | ||
− | * [[Core Function | + | |
* [[Core Function MsgBox|MsgBox( <message>, <title>, <flag>, <timeout> )]] -- Show a message dialog | * [[Core Function MsgBox|MsgBox( <message>, <title>, <flag>, <timeout> )]] -- Show a message dialog | ||
− | * [[Core Function InputBox|InputBox( <title>, <message>, <default text> )]] -- Shows a box to input text | + | * [[Core Function InputBox|InputBox( <title>, <message>, <default text> )]] -- Shows a box to input text. |
− | + | * [[Core Function ToolTip|ToolTip( <text>, <x>, <y> )]] -- Creates a tooltip anywhere on the screen. | |
− | + | * [[Core Function ToolTipKill|ToolTipKill( <ToolTip> )]] -- Delete a tooltip that was made using ToolTip(). | |
− | * [[Core Function ToolTip|ToolTip( <text>, <x>, <y> )]] -- Creates a tooltip anywhere on the screen | + | |
− | * [[Core Function ToolTipKill|ToolTipKill( <ToolTip> )]] -- Delete a tooltip that was made using ToolTip() | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==== Keyboard Control Functions ==== | ==== Keyboard Control Functions ==== | ||
− | * [[Core Function HotKeySet|HotKeySet( <keydef>, <expression | + | * [[Core Function HotKeySet|HotKeySet( <keydef>, <expression> )]] -- Create a custom hotkey to run custom code or execute a function. |
* [[Core Function SendKeys|SendKeys( <keydef>, <flag> )]] -- Sends simulated keystrokes to the active window | * [[Core Function SendKeys|SendKeys( <keydef>, <flag> )]] -- Sends simulated keystrokes to the active window | ||
− | |||
− | |||
==== Mouse Control Functions ==== | ==== Mouse Control Functions ==== | ||
Line 945: | Line 443: | ||
* [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor | * [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor | ||
* [[Core Function MouseWheel|MouseWheel ( <direction>, <clicks> )]] -- Moves the mouse wheel up or down | * [[Core Function MouseWheel|MouseWheel ( <direction>, <clicks> )]] -- Moves the mouse wheel up or down | ||
− | |||
==== Window Management Functions ==== | ==== Window Management Functions ==== | ||
Line 964: | Line 461: | ||
* [[Core Function WinClose|WinClose ( <title>, <text> )]] -- Closes a window | * [[Core Function WinClose|WinClose ( <title>, <text> )]] -- Closes a window | ||
* [[Core Function WinKill|WinKill ( <title>, <text> )]] -- Forces a window to close | * [[Core Function WinKill|WinKill ( <title>, <text> )]] -- Forces a window to close | ||
− | * [[Core Function WinMove|WinMove ( <title>, <text>, <x>, <y>, <width>, <height | + | * [[Core Function WinMove|WinMove ( <title>, <text>, <x>, <y>, <width>, <height> )]] -- Moves and/or resizes a window |
* [[Core Function WinWait|WinWait ( <title>, <text>, <timeout> )]] -- Waits until the requested window exists | * [[Core Function WinWait|WinWait ( <title>, <text>, <timeout> )]] -- Waits until the requested window exists | ||
* [[Core Function WinWaitActive|WinWaitActive ( <title>, <text>, <timeout> )]] -- Waits until the requested window is active | * [[Core Function WinWaitActive|WinWaitActive ( <title>, <text>, <timeout> )]] -- Waits until the requested window is active | ||
Line 975: | Line 472: | ||
* [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function | * [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function | ||
* [[Core Function WinFlash|WinFlash ( <title>, <text>, <flashes>, <delay> )]] -- Flashes a window in the taskbar | * [[Core Function WinFlash|WinFlash ( <title>, <text>, <flashes>, <delay> )]] -- Flashes a window in the taskbar | ||
− | |||
* [[Core Function WinList|WinList ( <title>, <text> )]] -- Retrieves a list of windows | * [[Core Function WinList|WinList ( <title>, <text> )]] -- Retrieves a list of windows | ||
Line 981: | Line 477: | ||
(For info on using <title>, <text> See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] ) | (For info on using <title>, <text> See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] ) | ||
− | * [[Core Function ControlClick|ControlClick ( <title>, <text>, <controlID | + | * [[Core Function ControlClick|ControlClick ( <title>, <text>, <controlID> )]] -- Sends a mouse click command to a given control |
* [[Core Function ControlSend|ControlSend ( <title>, <text>, <controlID>, <string> <flag> )]] -- Sends a string of characters to a control | * [[Core Function ControlSend|ControlSend ( <title>, <text>, <controlID>, <string> <flag> )]] -- Sends a string of characters to a control | ||
* [[Core Function ControlGetFocus|ControlGetFocus ( <title>, <text> )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window | * [[Core Function ControlGetFocus|ControlGetFocus ( <title>, <text> )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window | ||
Line 989: | Line 485: | ||
* [[Core Function ControlShow|ControlShow ( <title>, <text>, <controlID> )]] -- Shows a control that was hidden | * [[Core Function ControlShow|ControlShow ( <title>, <text>, <controlID> )]] -- Shows a control that was hidden | ||
* [[Core Function ControlHide|ControlHide ( <title>, <text>, <controlID> )]] -- Hides a control | * [[Core Function ControlHide|ControlHide ( <title>, <text>, <controlID> )]] -- Hides a control | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Graphics/Pixel Functions ==== | ==== Graphics/Pixel Functions ==== | ||
* [[Core Function PixelGetColour|PixelGetColour ( <x>, <y> )]] -- Returns a pixel colour according to x, y pixel coordinates | * [[Core Function PixelGetColour|PixelGetColour ( <x>, <y> )]] -- Returns a pixel colour according to x, y pixel coordinates | ||
* [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer | * [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer | ||
− | * [[Core Function PixelSearch|PixelSearch ( <left>, <top>, <right>, <bottom>, <colour>, <shade | + | * [[Core Function PixelSearch|PixelSearch ( <left>, <top>, <right>, <bottom>, <colour>, <shade>, <step> )]] -- Searches a rectangle of pixels for the pixel colour provided |
− | + | * [[Core Function PixelChecksum|PixelChecksum ( <left>, <top>, <right>, <bottom>, <step> )]] -- Generates a checksum for a region of pixels | |
− | * [[Core Function PixelChecksum|PixelChecksum ( <left>, <top>, <right>, <bottom>, <step> | + | |
* [[Core Function Colour|Colour( <name> )]] -- Get the colour INT value of a given colours name | * [[Core Function Colour|Colour( <name> )]] -- Get the colour INT value of a given colours name | ||
* [[Core Function RGB|RGB( <red>, <green>, <blue> )]] -- Get the colour INT value of given red, green and blue bytes | * [[Core Function RGB|RGB( <red>, <green>, <blue> )]] -- Get the colour INT value of given red, green and blue bytes | ||
Line 1,009: | Line 496: | ||
* [[Core Function GetGValue|GetGValue( <colour> )]] -- Get the green byte from a colour INT value | * [[Core Function GetGValue|GetGValue( <colour> )]] -- Get the green byte from a colour INT value | ||
* [[Core Function GetBValue|GetBValue( <colour> )]] -- Get the blue byte from a colour INT value | * [[Core Function GetBValue|GetBValue( <colour> )]] -- Get the blue byte from a colour INT value | ||
− | |||
− | |||
− | ==== | + | ==== Misc Functions ==== |
− | * [[Core Function | + | * [[Core Function Call|Call <function>, <expressions>]] -- Calls a function contained in a string parameter |
− | + | * [[Core Function Return|Return <expressions>]] -- Returns a result from a Function | |
− | + | ||
− | * [[Core Function | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function Throw|Throw( <expression> )]] -- Throw an exception | * [[Core Function Throw|Throw( <expression> )]] -- Throw an exception | ||
* [[Core Function Die|Die( <expression> )]] -- Gives an error and terminates the program | * [[Core Function Die|Die( <expression> )]] -- Gives an error and terminates the program | ||
− | + | * [[Core Function Eval|Eval( <expression>, <flag> )]] -- Evaluate a string as Sputnik code | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * [[Core Function Eval|Eval( <expression>, <flag | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [[Core Function GC|GC( <flag> )]] -- Use the garbage collector | * [[Core Function GC|GC( <flag> )]] -- Use the garbage collector | ||
− | |||
* [[Core Function Require|Require( <file>, <flag> )]] -- Add all functions etc from a file for use | * [[Core Function Require|Require( <file>, <flag> )]] -- Add all functions etc from a file for use | ||
* [[Core Function Include|Include( <file>, <flag> )]] -- Add all functions etc from a file for use and execute all expressions | * [[Core Function Include|Include( <file>, <flag> )]] -- Add all functions etc from a file for use and execute all expressions | ||
− | |||
* [[Core Function Opt|Opt( <option>, <value> )]] -- Changes the operation of various Sputnik functions/parameters | * [[Core Function Opt|Opt( <option>, <value> )]] -- Changes the operation of various Sputnik functions/parameters | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== User Defined Functions === | === User Defined Functions === |
Revision as of 07:22, 18 June 2015
Function Reference
How to create a Function
To create your own funtions see the Function page.
Core Functions
Language Features
- <Expression> =~ m/pattern/flags -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups
- <Expression> =~ s/pattern/replacement/flags -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups
- Goto Label; & Label: -- Jump to another section of the script
Console Functions
- Print( <expression> ) -- Prints an expressions string value to the console window
- Println( <expression> ) -- Prints an expressions string value to the console window and inserts a newline charactor at the end.
- Printf( <expression>, <expressions>... ) -- Print a formatted string to the console window
- Input( <expression> ) -- Capture a string typed to console window
- InputC( <expression> ) -- Capture a char typed to console window
- Cls( ) -- Clear all text from the console window
- ConsoleHide( ) -- Hide the console window
- ConsoleShow( ) -- Show the console window
- ConsoleBeep( <freq>, <duration> ) -- Plays the sound of a beep of a specified frequency and duration through the console speaker
- ConsoleSeek( <x>, <y> ) -- Set the position of the console cursor
- ConsoleBackColour( <colour> ) -- Set the background (behind text) colour of the console
- ConsoleForeColour( <colour> ) -- Set the foreground (text) colour of the console
- ConsoleBufferWidth( <newval> ) -- Get or Set the buffer width of the console window
- ConsoleBufferHeight( <newval> ) -- Get or Set the buffer height of the console window
- ConsoleWidth( <newval> ) -- Get or Set the width of the console window
- ConsoleHeight( <newval> ) -- Get or Set the height of the console window
- ConsoleTitle( <newtitle> ) -- Get or Set the title of the console window
- ConsoleCursorLeft( <newval> ) -- Gets or sets the column position of the cursor within the buffer area
- ConsoleCursorTop( <newval> ) -- Gets or sets the row position of the cursor within the buffer area
- ConsoleCursorSize( <newval> ) -- Gets or sets the height of the cursor within a character cell
- ConsoleCursorVisible( <newval> ) -- Gets or sets a value indicating whether the cursor is visible
Multi-Threading Functions
- ThreadCreate( <name>, <function> ) -- Create a new thread and start it off executing a function or some code
- ThreadSleep( <name> ) -- Freeze a thread and make it sleep
- ThreadResume( <name> ) -- Unfreeze a thread and allow it to continue execution
- ThreadState( <name> ) -- Returns state of a thread
- ThreadKill( <name> ) -- Terminate a thread and remove it from the script
- ThreadExists( <name> ) -- Check if a thread exists by this name
- ThreadName( ) -- Returns the name of the current thread that is executing this code
- Threads( ) -- Return an array of all threads
Variable Type Conversions
- Char( <expression> ) -- Returns the single letter representation of an expression
- Byte( <expression> ) -- Returns the unsigned 8-bit integer (whole number) representation of an expression
- SByte( <expression> ) -- Returns the signed 8-bit integer (whole number) representation of an expression
- Short( <expression> ) -- Returns the signed 16-bit integer (whole number) representation of an expression
- Int16( <expression> ) -- Returns the signed 16-bit integer (whole number) representation of an expression
- Int32( <expression> ) -- Returns the signed 32-bit integer (whole number) representation of an expression
- Int( <expression> ) -- Returns the signed 32-bit integer (whole number) representation of an expression
- Int64( <expression> ) -- Returns the signed 64-bit integer (whole number) representation of an expression
- Long( <expression> ) -- Returns the signed 64-bit integer (whole number) representation of an expression
- UShort( <expression> ) -- Returns the unsigned 16-bit integer (whole number) representation of an expression
- UInt16( <expression> ) -- Returns the unsigned 16-bit integer (whole number) representation of an expression
- UInt32( <expression> ) -- Returns the unsigned 32-bit integer (whole number) representation of an expression
- UInt( <expression> ) -- Returns the unsigned 32-bit integer (whole number) representation of an expression
- UInt64( <expression> ) -- Returns the unsigned 64-bit integer (whole number) representation of an expression
- ULong( <expression> ) -- Returns the unsigned 64-bit integer (whole number) representation of an expression
- Float( <expression> ) -- Returns the 32-bit floating point representation of an expression
- Double( <expression> ) -- Returns the 64-bit floating point representation of an expression
- String( <expression> ) -- Returns the String representation of an expression
Common Variable Functions
Misc
- Unset( $variable ) -- Delete a variable
- IsDeclared( <variable name> ) -- Check if a variable has been declared
Hash/Array
- Reset( $variable ) -- Reset the current array pointer to the first element
- Next( $variable ) -- Set the array pointer to the next element
- Prev( $variable ) -- Set the array pointer to the previous element
Type Checking
- isVarChar( $variable ) -- Checks if a variable is a char type
- isVarByte( $variable ) -- Checks if a variable is an unsigned 8-bit integer type
- isVarSByte( $variable ) -- Checks if a variable is a signed 8-bit integer type
- isVarShort( $variable ) -- Checks if a variable is a signed 16-bit integer type
- isVarInt16( $variable ) -- Checks if a variable is a signed 16-bit integer type
- isVarInt( $variable ) -- Checks if a variable is a signed 32-bit integer type
- isVarInt32( $variable ) -- Checks if a variable is a signed 32-bit integer type
- isVarInt64( $variable ) -- Checks if a variable is a signed 64-bit integer type
- isVarLong( $variable ) -- Checks if a variable is a signed 64-bit integer type
- isVarUShort( $variable ) -- Checks if a variable is an unsigned 16-bit integer type
- isVarUInt16( $variable ) -- Checks if a variable is an unsigned 16-bit integer type
- isVarUInt( $variable ) -- Checks if a variable is an unsigned 32-bit integer type
- isVarUInt32( $variable ) -- Checks if a variable is an unsigned 32-bit integer type
- isVarUInt64( $variable ) -- Checks if a variable is an unsigned 64-bit integer type
- isVarULong( $variable ) -- Checks if a variable is an unsigned 64-bit integer type
- isVarFloat( $variable ) -- Checks if a variable is a single precision floating point type
- isVarDouble( $variable ) -- Checks if a variable is a double precision floating point type
- isVarString( $variable ) -- Checks if a variable is a string type
- isVarNumber( $variable ) -- Checks if a variable is any integer or float/double type
- isVarBinary( $variable ) -- Checks if a variable is a binary type
- isVarRef( $variable ) -- Check if a variable is an reference to another variable
- isVarArray( $variable ) -- Check if a variable is an array
- isVarObj( $variable, <type> ) -- Check if a variable is an object type (This includes classes, file handles etc)
- isVarClass( $variable, <type> ) -- Check if a variable's object type is a class
- isVarGUI( $variable ) -- Check if a variable's object type is a GUI
- isVarGUIObject( $variable, <type> ) -- Check if a variable's object type is a GUI Object (Buttons etc)
- isVarDLLStruct( $variable ) -- Check if a variable holds a DLLStruct
- isVarServer( $variable ) -- Check if a variable holds a Server object from Listen()
- isVarClient( $variable ) -- Check if a variable holds a Client object from Connect()
- isVarClientSocket( $variable ) -- Check if a variable holds a Client socket object
Get Type Directly
- GetVarType( $variable ) -- Get the common type of a variable
- GetVarObjType( $variable ) -- Get the common object type of a variable (If it is an object)
- GetVarGUIObjType( $variable ) -- Get the common object type of a variable (If it is a GUI object)
Binary Data Management Functions
- Pack( <expression>, <expressions> ) -- Pack data into a binary array
- Unpack( <expression>, <binary-array> ) -- Unpack data from a binary array
- BinaryCreate( <size>, <fill> ) -- Create a new binary variable and its array size and fill data type
- BinaryClone( <binary-array> ) -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one
- BinaryWipe( <binary-array> ) -- Wipes a binary variables data 100% and sets the variable to a blank int containing just 0
- BinaryStr( <binary-array>, <separator> ) -- Create a Hex string from a binary array
- BinaryHex( <expression> ) -- Create a binary array from a hex string
- BinaryLen( <binary-array> ) -- Returns the number of bytes in a binary variable
- BinaryGet( <binary-array>, <index> ) -- Get the byte at an index of a binary variable
- BinarySet( <binary-array>, <index>, <value> ) -- Set the byte at an index of a binary variable
- BinaryReverse( <binary-array>, <start>, <length> ) -- Reverse the order bytes a binary variable
- BinaryMid( <binary-array>, <start>, <length> ) -- Create a binary variable by extracting a number of bytes from another binary variable
- BinaryAppend( <binary-array>, <binary-array2>, <flag> ) -- Append a binary variables data onto the end or beginning of another binary variables data
- BinaryInsert( <binary-array>, <binary-array2>, <index> ) -- Insert a binary variables data into another binary variable at a specific location
- BinaryUnshift( <binary-array>, <byte> ) -- Add a byte to the beginning of a binary variable
- BinaryPush( <binary-array>, <byte> ) -- Add a byte to the end of a binary variable
- BinaryShift( <binary-array> ) -- Delete the first byte from a binary variable
- BinaryPop( <binary-array> ) -- Delete the last byte from a binary variable
- BinaryResize( <binary-array>, <size>, <data> ) -- Resize a binary variables data array
- BinaryCompress( <binary-array> ) -- Compress a binary variables data
- BinaryUncompress( <binary-array> ) -- Uncompress a binary variable data
- BinarySave( <binary-array>, <file>, <flag> ) -- Save a binary variable data to file
- BinaryLoad( <file>, <flag> ) -- Create a new binary variable by loading binary data from a file
Math Functions
- Abs( <expression> ) -- Calculates the absolute value of a number
- ACos( <expression> ) -- Calculates the arcCosine of a number
- ASin( <expression> ) -- Calculates the arcsine of a number
- ATan( <expression> ) -- Calculates the arctangent of a number
- ATan2( <expression>, <expression2> ) -- Compute arc tangent with two parameters
- BitAND( <expression>, <expression2>, <n> ) -- Performs a bitwise AND operation
- BitNOT( <expression> ) -- Performs a bitwise NOT operation
- BitOR( <expression>, <expression2>, <n> ) -- Performs a bitwise OR operation
- BitSHIFT( <value>, <shift> ) -- Performs a bit shifting operation
- BitXOR( <expression>, <expression2>, <n> ) -- Performs a bitwise exclusive OR (XOR) operation
- Ceiling( <expression> ) -- Returns a number rounded up to the next integer
- Cos( <expression> ) -- Calculates the cosine of a number
- Cosh( <expression> ) -- Returns the hyperbolic cosine of the specified angle
- Exp( <expression> ) -- Returns e raised to the specified power
- Floor( <expression> ) -- Returns the largest integer less than or equal to the specified number
- Log( <expression> ) -- Returns the logarithm of a specified number
- Log10( <expression> ) -- Returns the common (base-10) logarithm of a specified number
- Math( <expression> ) -- Parse a string containing mathematical equations
- Max( <expression>, <expression2> ) -- Find the greater number and return it
- Min( <expression>, <expression2> ) -- Find the lesser number and return it
- Mod( <expression>, <expression2> ) -- Performs the modulus operation
- Pow( <expression>, <expression2> ) -- Returns a specified number raised to the specified power
- Random( <expression>, <expression2> ) -- Get a random number from the defined area.
- Round( <expression>, <decimalplaces> ) -- Returns a number rounded to a specified number of decimal places
- Sin( <expression> ) -- Returns the sine of the specified angle
- Sinh( <expression> ) -- Returns the hyperbolic sine of the specified angle
- Sqrt( <expression> ) -- Returns the square root of a specified number
- Tan( <expression> ) -- Returns the tangent of the specified angle
- Tanh( <expression> ) -- Returns the hyperbolic tangent of the specified angle
- Truncate( <expression> ) -- Calculates the integral part of a specified decimal number
String Functions
- Asc( <char> ) -- Returns the ASCII code of a character.
- AscW( <char> ) -- Returns the UNICODE code of a character.
- Chr( <expression> ) -- Returns a character corresponding to an ASCII code.
- ChrW( <expression> ) -- Returns a character corresponding to a UNICODE code.
- Contains( <srting>, <string>, <casesense>) -- Check if string contains a sub string
- CSV( <string>, <delim>, <quote>, <comment> ) -- Split strings and parse a CSV text into an array
- Dec( <expression> ) -- Returns a integer representation of a hexadecimal string
- FDec( <expression> ) -- Returns a float representation of a hexadecimal string
- DDec( <expression> ) -- Returns a double representation of a hexadecimal string
- DecPad( <expression>, <count> ) -- Pads numeric string to a given number of chars (Filling in the gap with zeros)
- DecryptString( <expression>, <password> ) -- Decrypt a string with a given password
- EncryptString( <expression>, <password> ) -- Encrypt a string with a given password
- EndsWith( <expression>, <expression2>, <flag> ) -- Check if a string ends with a substring
- Hex( <expression>, <length> ) -- Returns a string representation of an integer type converted to hexadecimal
- FHex( <expression> ) -- Returns a string representation of an float type converted to hexadecimal
- DHex( <expression> ) -- Returns a string representation of an double type converted to hexadecimal
- InStr( <string>, <substirng>, <casesense>, <occurrence>, <start>, <count> ) -- Checks if a string contains a given substring.
- isAlpha( <expression> ) -- Checks if string contains only Alphabetic characters
- isAlphaNumeric( <expression> ) -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters
- isASCII( <expression> ) -- Check if string contains only ASCII chars
- isEmpty( <expression> ) -- Checks if a string is completely empty.
- isFloat( <expression> ) -- Check if string contains a floating point and could be converted
- isLower( <expression> ) -- Checks if string contains only lowercase letters
- isNumeric( <expression> ) -- Checks if string only contains numbers
- isSpace( <expression> ) -- Check if string contains only whitespace
- isSymbol( <expression> ) -- Check if string contains only symbol chars
- isUpper( <expression> ) -- Check if string contains only uppercase chars
- isXDigit( <expression> ) -- Check if string contains only hex chars
- LC( <expression> ) -- Returns string in all lower case
- LCFirst( <expression> ) -- Lower Cases first letter of string
- LCLast( <expression> ) -- Lower Cases last letter of string
- LCWords( <expression> ) -- Lower Cases first letter of each word in string
- Left( <expression>, <count> ) -- Returns a number of characters from the left-hand side of a string
- Match( <expression>, <charset> ) -- Check if a string contains only characters from a substring
- MD5( <expression> ) -- Creates MD5 Hash of specified string
- PadLeft( <expression>, <pad>, <count> ) -- Pad the left of a string a given number of times with another string
- PadRight( <expression>, <pad>, <count> ) -- Pad the right of a string a given number of times with another string
- RandStr( <count> ) -- Generate a random sequence of characters at a given length
- Repeat( <expression>, <count>, <flag> ) -- Create a new string or new array containing repeats of a string provided
- Replace( <expression>, <find>, <replace>, <case-sensitive-flag> ) -- Replace substrings within a string with other strings
- Reverse( <expression> ) -- Reverse all characters in a string
- Right( <expression>, <count> ) -- Returns a number of characters from the right-hand side of a string
- SHA1( <expression> ) -- Returns SHA1 hash of string
- Split( <expression>, <delim/pattern>, <flag> ) -- Splits up a string into substrings depending on the given delimiters.
- SPrintf( <expression>, <expressions>... ) -- Create a formatted string
- StartsWith( <expression>, <expression2>, <flag> ) -- Check if a string starts with a substring
- StrInsert( <expression>, <index>, <expression2> ) -- Insert a string at a given index of another string and return the new string
- StrIndex( <expression>, <index> ) -- Get or set a char from/to a string at a specific index
- StrLen( <expression> ) -- Returns length of specified string
- SubStr( <expression>, <start>, <end> ) -- Return part of a string
- Trim( <expression>, <chars> ) -- Removes whitespace from the beginning and end of a string
- TrimLeft( <expression>, <chars> ) -- Strip whitespace from the start of a string
- TrimRight( <expression>, <chars> ) -- Strip whitespace from the end of a string
- UC( <expression> ) -- Returns string in all Upper Case
- UCFirst( <expression> ) -- Upper Cases first letter of string
- UCLast( <expression> ) -- Upper Cases last letter of string
- UCWords( <expression> ) -- Upper Cases first letter of each word in string
Array Functions
- Join( <array>, <separator> ) -- Join an array into a string with an optional separator
- UBound( <array/binary-array> ) -- Returns the size of array (How many elements it currently has stored)
- Push( <array>, <expressions> ) -- Add items to the end of an array
- Insert( <array>, <id>, <expressions> ) -- Add items to an array at a given location
- Unshift( <array>, <expressions> ) -- Add items to the beginning of an array
- Pop( <array> ) -- Delete the first item in an array
- Shift( <array> ) -- Delete the last item in an array
- Remove( <array>, <start-id>, <end-id> ) -- Delete items from an array starting at a given location and stopping at a given location
- IsIndexSet( <array>, <index> ) -- Check if an element exist at a given index ID within an array
Hash (Dictionary) Functions
- Each( <array> ) -- Get hash key/value pair and return them as a 2 element array and each time the function is called get the next key/value pair
- IsKeySet( <array>, <key> ) -- Check if given key exists within an array (hash/dictionary)
Process Functions
- DLLCall( <dll>, <function>, <returntype>, <paramtypes>, <params> ) -- Dynamically call a function in a DLL
- DLLStructCreateDef( <name>, <def string> ) -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs
- DLLStructCreate( <def string> ) -- Creates a C/C++ style structure to be used with DLLCall
- DLLStructGetData( <dllstruct>, <element>, <index> ) -- Returns the data of an element of the struct
- DLLStructSetData( <dllstruct>, <element>, <index> ) -- Set the data of an element of the struct
- DLLStructGetSize( <dllstruct> ) -- Returns the size of the struct in bytes
- DLLStructGetPtr( <dllstruct>, <element>, <index> ) -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment
- DLLStructGetVars( <dllstruct> ) -- Create an array of all items and their array size with total byte size
- LoadAssembly( <file> ) -- Load a .NET DLL into a variable
- UnloadAssembly( <assembly> ) -- Unload a .NET DLL from a variable
- GetMethod( <assembly>, <namespace>, <class>, <method>, <paramdefs>, <params> ) -- Load an instance of a method and its container class into a variable to be able to call it
- Invoke( <method>, <params> ) -- Call the function obtained from GetMethod()
- Run( <file>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program
- RunWait( <file>, <timeout>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program and waits until the program finishes
- RunAsSet( <user>, <domain>, <password>, <options> ) -- Initialise a set of user credentials to use during Run and RunWait operations.
- ProcessClose( <pid/name> ) -- Terminates a named process
- ProcessExists( <pid/name> ) -- Checks to see if a specified process exists
- ProcessList( <name> ) -- Returns an array listing the currently running processes (names and PIDs)
- ProcessSetPriority( <pid/name>, <priority> ) -- Changes the priority of a process
- ProcessWait( <pid/name>, <timeout> ) -- Pauses the current thread until a given process exists or optional the timeout expires
- ProcessWaitClose( <pid/name>, <timeout> ) -- Pauses the current thread until a given process no longer exists or optional the timeout expires
- Shutdown( <shutdown code> ) -- Shuts down the system
- Debug( <flag> ) -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread
Environment Management
- EnvExpand( <expression> ) -- Convert a string containing %name% env tags and return complete string with names resolved
- EnvGet( <tag> ) -- Get the value of an environment variable
- EnvSet( <tag>, <expression> ) -- Set the value of an environment variable
- EnvUpdate( ) -- Refreshes the OS environment
File Functions
File Create/Read/Write Functions
- FileOpen( <FileName>, <flag> ) -- Opens a file for reading or writing
- FileClose( <file> ) -- Closes a previously opened file
- FileWrite( <file>, <expression> ) -- Write text to previously opened file at the current File Steam pointer location
- FileWriteBinary( <file>, <binary-array> ) -- Write the data from a binary variable to previously opened file at the current File Steam pointer location
- FileAppend( <file>, <expression> ) -- Append a line of text to the end of a previously opened text file
- FileAppendBinary( <file>, <binary-array> ) -- Append the data from a binary variable to the end of a previously opened file
- FileSeek( <file>, <offset>, <flag> ) -- Change the POSITION of the File Stream pointer
- FilePos( <file> ) -- Get the current POSITION of the File Stream pointer
- FileRead( <file>, <expression> ) -- Read a number of characters from a previously opened text file starting from current File Steam pointer location
- FileReadBinary( <file>, <expression> ) -- Read a number of bytes from a previously opened file starting from current File Steam pointer location
- FileReadLine( <file>, <expression> ) -- Read a line of text from a previously opened text file (Or specify a name of a file)
- FileReadLines( <file> ) -- Read all lines of text from a previously opened text file (Or specify a name of a file)
- FileSave( <file>, <expression> ) -- Save all text to a file
- FileLoad( <file> ) -- Load all text from a file
Misc
- FileCopy( <file1>, <file2>, <flag> ) -- Copy a file
- FileDelete( <file> ) -- Delete a file
- FileExists( <file> ) -- Check if a given file exists
- FileCreationTime( <file>, <flag> ) -- Get the creation time of a file
- FileWriteTime( <file>, <flag> ) -- Get the last write time of a file
- FileAccessTime( <file>, <flag> ) -- Get the last access time of a file
- FileEncrypt( <file> ) -- Encrypt a file so only the windows account used to encrypt it can decrypt it
- FileDecrypt( <file> ) -- Decrypt a file previously encrypted by this windows user account
- FileMD5( <file> ) -- Calculate the MD5 checksum of a file
- FileSHA1( <file> ) -- Calculate the SHA1 checksum of a file
Dialogs
- FileSaveDialog ( <title>, <dir>, <filter>, <options>, <default name> ) -- Initiates a Save File Dialog
- FileOpenDialog ( <title>, <dir>, <filter>, <options>, <default name> ) -- Initiates a Load File Dialog
Directory Functions
- GetFiles ( <path>, <pattern> ) -- Get an array of all files in a directory
- GetFolders ( <path>, <pattern> ) -- Get an array of all folders in a directory
- MKDir ( <path> ) -- Creates all directories and subdirectories as specified by path
- RMDir ( <path>, <flag> ) -- Deletes the specified directory and, if indicated, any subdirectories in the directory
- DirExists ( <path> ) -- Determines whether the given path refers to an existing directory on disk
- DirCopy ( <sourcepath>, <destpath> ) -- Copies a directory and all sub-directories and files (Similar to xcopy)
Dialogs
- FolderSelectDialog ( <text>, <dir>, <flag>, <init dir> ) -- Initiates a Browse For Folder Dialog
Path Functions
- HasExtension ( <path> ) -- Determines whether a path includes a file name extension
- GetFullPath ( <path> ) -- Returns the absolute path for the specified path string
- GetDirectoryName ( <path> ) -- Returns the directory information for the specified path string
- GetExtension ( <path> ) -- Returns the extension of the specified path string
- GetFileName ( <path> ) -- Returns the file name and extension of the specified path string
- GetFileNameWithoutExtension ( <path> ) -- Returns the file name of the specified path string without the extension
- GetPathRoot ( <path> ) -- Gets the root directory information of the specified path
- IsPathRooted ( <path> ) -- Gets a value indicating whether the specified path string contains absolute or relative path information
Network Functions
HTTP Functions
- HTTPFileExists( <not available> ) -- Check if a file exists at a given URL
- HTTPGetString( <not available> ) -- Copy all text from a URL and return it as a string
MySQL Functions
- MySQLConnect( <ip/ip:port>, <login>, <password> ) -- Connect to a MySQL database
- MySQLSelectDB( <mysql>, <db name> ) -- Select a database
- MySQLQuery( <mysql>, <query> ) -- Execute a query
- MySQLFill( <mysql>, <query> ) -- Grab a table or parts of it from the Database
- MySQLFetch( <mysql data> ) -- Fetch the next row from a table
- MySQLFetchReset( <mysql data> ) -- Reset the current position in the table rows to 0
- MySQLFields( <mysql data> ) -- Return how many Fields are in the table
- MySQLRows( <mysql data> ) -- Return how many Rows are in the table
- MySQLClose( <mysql> ) -- Close a MySQL connection
Sputnik Client/Server Functions (This is just for connecting Sputnik Clients to Sputnik Servers nothing else)
- SSListen( <port>, <max connections>, <name> ) -- Create a server and begin listening for clients to connect
- SSConnect( <ip>, <port>, <connection string>, <name> ) -- Connect to a server
- SSApprove( <server>, <client socket> ) -- Approve a client to connect to the server
- SSDisapprove( <server>, <client socket> ) -- Disapprove a client to connect to the server
- SSClientStatus( /* depends... /* ) -- Get the status of a client or of our client
- SSClientIP( <server>, <client socket> ) -- Get the IP of a client socket
- SSRecv( <server/client> ) -- Check for a message recieved from client/server
- SSRead( <message buffer>, <data type> ) -- Read data from a message
- SSDrop( <server>, <client socket> ) -- Kick a client off the server
- SSSendBufferCreate( <server/client> ) -- Create a new buffer to store data to send to the client/server
- SSSendBufferAppend( <message buffer>, <type>, <data> ) -- Add data to the buffer to send such as Strings etc
- SSSend( /* depends... /* ) -- Send data to client or server
Misc Network Functions
- HostResolve( <host name> ) -- Resolves a host name such as google.com into an IP address
- Ping( <ip address/host name> ) -- Pings a host and returns the roundtrip-time
Memory Functions
- WriteMem( < Caption / PID >, <Class>, <Address>, <value> ) -- Write a value to an address in an application's memory (Supports multiple values and even binary variables for writing multiple bytes)
- ReadMem( < Caption / PID >, <Class>, <Address>, <defs>, <size> ) -- Read bytes from an application's memory at an address and create variables using same defs and return values as Unpack()
- Alloc( <size>, <flag> ) -- Allocate memory and return the pointer to it
- Free( <ptr> ) -- Deallocate memory from a pointer
- StringToPTR( <type>, <string> ) -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory
- PTRToString( <type>, <ptr> ) -- Reads a string from a memory pointer
- PTRRead( <ptr>, <type>, <offset> ) -- Read data from a memory pointer optionally starting from a given index
- PTRWrite( <ptr>, <type>, <offset>, <value> ) -- Write data to a memory pointer optionally starting from a given index
GUI Functions
Dialog Creation Functions
- GUICreate( <Title>, <Width>, <Height>, <Left>, <Top> ) -- Create new GUI window
- DoEvents( ) -- Keep GUI window active by dispatching all messages in the queue
Dialog Properties Get/Set Functions
- GUIState( <expression> ) -- Gets current GUI state
- GUISetState( <expression> ) -- Sets GUI state
Control Creation Functions
- GUICreateButton( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a button
- GUICreateTextBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a Textbox
- GUICreateTextBoxEx( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a multiline Textbox
- GUICreatePassword( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a Passweord Box
- GUICreateLabel( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a Label
- GUICreateCheckBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a CheckBox
- GUICreateTimer( <gui/container>, <name>, <interval> ) -- Create a timer
- GUICreateDataGrid( <gui/container>, <name>, <left>, <top>, <width>, <height> ) -- Create a Data Grid
- GUICreateGroupBox( <gui/container>, <name>, <text>, <left>, <top>, <width>, <height> ) -- Create a GroupBox
- GUICreateTabSheet( <gui/container>, <name>, <left>, <top>, <width>, <height> ) -- Create a TabSheet
Event Linking Functions
- GUILink( <gui/guiobject>, <linktype> ) -- Links an event to a GUI or GUI Object
Common Dialog/Control Properties Get/Set Functions
- GUIGetProp( <gui object>, <prop> ) -- Get the value of a GUI objects property
- GUISetProp( <gui object>, <prop>, <value> ) -- Set the value of a GUI objects property
Common Dialog/Control Method Functions
- GUIPropInvoke( <gui/gui object>, <method> ) -- Invoke a method of the GUI/GUIObject such as Focus()
GUIGetProp & GUISetProp Examples
Here are some GUIGetProp & GUISetProp Examples that you might not figure out by yourself.
- Change colour of controls -- Shows how to change the background and foreground colour on Buttons, Windows etc.
Control Properties Get/Set Functions
- GUITimerStart( <timer> ) -- Starts specified timer
- GUITimerStop( <timer> ) -- Stops specified timer
- GUIDataGrid( <datagrid> ) -- Properties & Functions specifically for Data Grid
- GUITabSheet( <tabsheet> ) -- Properties & Functions specifically for Tab Sheet
Other GUI Functions
- GUIMsgFilter( <gui>, <command> ) -- Use a function to recieve all messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM)
- GUICreateFont( <name>, <size>, <style> ) -- Create a new font for use on buttons etc
- GUIFont( < font >, <setting>, <value> ) -- Change the style, size etc on a font object
- MsgBox( <message>, <title>, <flag>, <timeout> ) -- Show a message dialog
- InputBox( <title>, <message>, <default text> ) -- Shows a box to input text.
- ToolTip( <text>, <x>, <y> ) -- Creates a tooltip anywhere on the screen.
- ToolTipKill( <ToolTip> ) -- Delete a tooltip that was made using ToolTip().
Keyboard Control Functions
- HotKeySet( <keydef>, <expression> ) -- Create a custom hotkey to run custom code or execute a function.
- SendKeys( <keydef>, <flag> ) -- Sends simulated keystrokes to the active window
Mouse Control Functions
- MouseClick ( <button>, <x>, <y>, <clicks>, <speed> ) -- Perform a mouse click operation
- MouseClickDrag ( <button>, <x1>, <y1>, <x2>, <y2>, <speed> ) -- Perform a mouse click and drag operation
- MouseDown ( <button> ) -- Perform a mouse down event at the current mouse position
- MouseUp ( <button> ) -- Perform a mouse up event at the current mouse position
- MouseMove ( <x>, <y>, <speed> ) -- Moves the mouse pointer
- MouseGetPos ( ) -- Retrieves the current position of the mouse cursor
- MouseWheel ( <direction>, <clicks> ) -- Moves the mouse wheel up or down
Window Management Functions
(For info on using <title>, <text> See Window Titles and Text (Advanced) )
- WinActivate ( <title>, <text> ) -- Activates (gives focus to) a window
- WinActive ( <title>, <text> ) -- Checks to see if a specified window exists and is currently active
- WinExists ( <title>, <text> ) -- Checks to see if a specified window exists
- WinGetClassList ( <title>, <text> ) -- Retrieves the classes from a window
- WinGetHandle ( <title>, <text> ) -- Retrieves the internal handle of a window
- WinGetPos ( <title>, <text> ) -- Retrieves the position and size of a given window
- WinGetCaretPos ( ) -- Returns the coordinates of the caret in the foreground window
- WinGetTitle ( <title>, <text> ) -- Retrieves the full title from a window
- WinGetText ( <title>, <text> ) -- Retrieves the text from a window
- WinGetState ( <title>, <text> ) -- Retrieves the state of a given window
- WinGetProcess ( <title>, <text> ) -- Retrieves the Process ID (PID) associated with a window
- WinGetClientSize ( <title>, <text> ) -- Retrieves the size of a given window's client area
- WinClose ( <title>, <text> ) -- Closes a window
- WinKill ( <title>, <text> ) -- Forces a window to close
- WinMove ( <title>, <text>, <x>, <y>, <width>, <height> ) -- Moves and/or resizes a window
- WinWait ( <title>, <text>, <timeout> ) -- Waits until the requested window exists
- WinWaitActive ( <title>, <text>, <timeout> ) -- Waits until the requested window is active
- WinWaitNotActive ( <title>, <text>, <timeout> ) -- Waits until the requested window is not active
- WinWaitClose ( <title>, <text>, <timeout> ) -- Waits until the requested window does not exist
- WinSetTitle ( <title>, <text>, <newtitle> ) -- Changes the title of a window
- WinSetState ( <title>, <text>, <flag> ) -- Shows, hides, minimizes, maximizes, or restores a window
- WinSetTrans ( <title>, <text>, <transparency> ) -- Sets the transparency of a window
- WinMinimizeAll ( ) -- Minimizes all windows
- WinMinimizeAllUndo ( ) -- Undoes a previous WinMinimizeAll function
- WinFlash ( <title>, <text>, <flashes>, <delay> ) -- Flashes a window in the taskbar
- WinList ( <title>, <text> ) -- Retrieves a list of windows
Controls
(For info on using <title>, <text> See Window Titles and Text (Advanced) )
- ControlClick ( <title>, <text>, <controlID> ) -- Sends a mouse click command to a given control
- ControlSend ( <title>, <text>, <controlID>, <string> <flag> ) -- Sends a string of characters to a control
- ControlGetFocus ( <title>, <text> ) -- Returns the ControlRef# of the control that has keyboard focus within a specified window
- ControlGetPos ( <title>, <text>, <controlID> ) -- Retrieves the position and size of a control relative to it's window
- ControlDisable ( <title>, <text>, <controlID> ) -- Disables a control
- ControlEnable ( <title>, <text>, <controlID> ) -- Enables a control
- ControlShow ( <title>, <text>, <controlID> ) -- Shows a control that was hidden
- ControlHide ( <title>, <text>, <controlID> ) -- Hides a control
Graphics/Pixel Functions
- PixelGetColour ( <x>, <y> ) -- Returns a pixel colour according to x, y pixel coordinates
- PixelGetMouse ( ) -- Returns a pixel colour according to x, y position of the mouse pointer
- PixelSearch ( <left>, <top>, <right>, <bottom>, <colour>, <shade>, <step> ) -- Searches a rectangle of pixels for the pixel colour provided
- PixelChecksum ( <left>, <top>, <right>, <bottom>, <step> ) -- Generates a checksum for a region of pixels
- Colour( <name> ) -- Get the colour INT value of a given colours name
- RGB( <red>, <green>, <blue> ) -- Get the colour INT value of given red, green and blue bytes
- GetRValue( <colour> ) -- Get the red byte from a colour INT value
- GetGValue( <colour> ) -- Get the green byte from a colour INT value
- GetBValue( <colour> ) -- Get the blue byte from a colour INT value
Misc Functions
- Call <function>, <expressions> -- Calls a function contained in a string parameter
- Return <expressions> -- Returns a result from a Function
- Throw( <expression> ) -- Throw an exception
- Die( <expression> ) -- Gives an error and terminates the program
- Eval( <expression>, <flag> ) -- Evaluate a string as Sputnik code
- GC( <flag> ) -- Use the garbage collector
- Require( <file>, <flag> ) -- Add all functions etc from a file for use
- Include( <file>, <flag> ) -- Add all functions etc from a file for use and execute all expressions
- Opt( <option>, <value> ) -- Changes the operation of various Sputnik functions/parameters
User Defined Functions
These functions are created using Sputnik and are not part of the Sputnik core language.