-
Notifications
You must be signed in to change notification settings - Fork 0
Standard Functions
Standard Functions in IterkoczeScript are functions that are defined and known at runtime. You don't need to provide any additional files or libraries in order for this functions to work.
? - Optional argument.
* - Can raise an error.
Write(arg1, arg2?):
NOTE: The Write function ignores null
arg1 - Element to write
arg2 - Colour for text
returns: null
Read(arg1?):
arg1 - Prompt
returns: User input -> string
*ReadAsInt(arg1?):
arg1 - Prompt
returns: User input -> int
Negative(number):
returns: int
FileWrite(arg1, arg2):
arg1 - Path to file
arg2 - Element to write
returns: written text -> string
*FileRead(arg1):
arg1 - Path to file
returns: Text from file -> string
FileExists(arg1):
arg1 - Path to file
returns: bool
DirectoryCreate(path):
returns: null
AllFilesIn(path):
returns: array of all files in a path
FileGetExtention(string):
returns: string -> string
FileGetName(file):
returns: string -> string
GetConfigDirectory():
returns: string
GetChar(arg1, arg2):
arg1 - String
arg2 - Index of character
returns: Character at index from string -> string
ToLower(string):
string - String
returns: string but all lowercase -> string
ToUpper(string):
string - String
returns: string but all uppercase -> string
StringRemove(string, char):
returns: processed string -> string
StringEndsWith(string, string):
returns: bool
StringRemoveFirst(string):
Removes first character from string
returns: string -> string
*ConvertToInt(value):
returns: Converted value -> int
*ConvertToDouble(value):
returns: Converted value -> int
ConvertToString(arg1):
arg1 - element
returns: Converted value -> string
OK(function):
function - asserts if the function returned an error
returns: boolean
Exit(arg1):
arg1 - Exit code
returns: null
Sleep(time):
time - Sleep time in ms
returns: null
Argument(arg1):
arg1 - Argument index
returns: argument -> string
ArgumentCount():
returns: argument count -> int
StartRuntimeTimer():
Spins up the timer that can be used to measure the time that the script took to execute.
returns null
ClearRuntimeTimer():
returns null
StopRuntimeTimer():
returns null
GetRuntime():
Returns the runtime up to this point. Does not stop the timer.
returns int
Execute(arg1, arg2?):
arg1 - Name of the command to execute
arg2 - arguments
returns: null
Linux():
True if running on Linux, false if not
returns: bool
*Fetch(URL)
returns: A JSON data variable
*IsServerUp(IP, timeout?)
returns: null
*Download(URL, pathToFile)
returns: null
SHA1(string)
returns: SHA1 string
IterkoczeUUID()
returns: An UUID string. Very secure. I promise
Json(filePath)
returns: A JSON data variable
JsonRead(jsonDataVar, keyToRead)
returns: Read value
JsonArrayToArray(jsonData)
returns: An array
DebugDump():
returns: null