ZS Extension for small basic API
ZSApi

Some api functions.
GetCountryInfo
![]() |
GetCovidStats
![]() |
GetExchangeRate
![]() |
GetIPDetails
![]() |
GetPublicIP
![]() |
GetRandomFact
![]() |
GetRandomJoke
![]() |
GetRandomQuote
![]() |
GetShortURL
![]() |
GetTimeByZone
![]() |
GetWeather
![]() |
GetCountryInfo(country)

Retrieves information about a country.
country The country name (e.g., "India").
returns Country details as a string.
GetCovidStats(country)

Retrieves COVID-19 statistics for a given country.
country The country name (e.g., "USA").
returns COVID-19 statistics as a string.
GetExchangeRate(fromCurrency,toCurrency)

Retrieves the exchange rate between two currencies.
fromCurrency The base currency (e.g., "USD").
toCurrency The target currency (e.g., "EUR").
returns The exchange rate as a string.
GetIPDetails(ip)

Retrieves detailed information about an IP address.
ip The IP address to look up. Use "auto" for the current IP.
returns Formatted location details as a string.
GetPublicIP()

Retrieves the public IP address of the user.
returns The public IP address as a string.
GetRandomFact()

Retrieves a random fun fact.
returns A random fact as a string.
GetRandomJoke()

Retrieves a random programming-related joke.
returns A joke as a string.
GetRandomQuote()

Retrieves a random inspirational quote.
returns A quote as a string.
GetShortURL(longUrl)

Shortens a given URL using TinyURL.
longUrl The long URL to shorten.
returns The shortened URL.
GetTimeByZone(timezone)

Retrieves the current time for a specified timezone.
timezone The timezone (e.g., "Europe/London").
returns The current time in the given timezone.
GetWeather(city)

Retrieves the current weather for a given city.
city The city name (e.g., "London").
returns The weather report as a string.
ZSArguments

The Arguments object provides operations to access the command-line arguments that were passed at the start of this program.
This class has been taken from Small Basic version 0.2.
Count
![]() |
GetArgument
![]() |
Count

Gets the number of command-line arguments passed to this program.
GetArgument(index)

Returns the specified argument.
index Index of the argument.
returns The command-line argument at the specified index.
ZSCall

Use For Using Small Basic Sub As A Method.
Call2
![]() |
Call3
![]() |
CallSub
![]() |
CallSubWithEvent
![]() |
Function
![]() |
GetValue
![]() |
Return
![]() |
Return2
![]() |
Call2(Values,Sub)

Calls The Sub With Args.
The Varibles decleared inside sub will be assinged with new arg value.
A Varible by name Return value will be returned.
Values The Values Of Args Seperated By ;.
Sub The Sub Name.
returns The Output Send Through Return.
Call3(Values)

Calls The Sub With Args.
The Varibles decleared inside sub will be assinged with new arg value.
A Varible by name Return_SubName value will be returned.
Values The Values Of Args Seperated By ;.
returns The Output Send Through Return.
CallSub(Sub,Values)

Calls The Sub With Args.
Sub The Sub Name
Values The Values Of Args Seperated By ;.
returns The Output Send Through Return.
CallSubWithEvent(Values)

Calls The Sub That Is Suscribed To Function Event With Args.
Values The Values Of Args Seperated By ;.
returns The Output Send Through Return2.
Function

The Event Of Sub
GetValue(Name)

Gets The Value Sent To Stack
Name The name of stack
returns Value sent
Return(Value)

Return The Value to CallSub.
Value The Value To Return.
Return2(Value)

Return The Value to CallSubWithEvent
Value The Value To Return
ZSClipboard

Clipboard Functions In Small Basic.
Clear
![]() |
ContainsAudio
![]() |
ContainsFileDropList
![]() |
ContainsImage
![]() |
ContainsText
![]() |
GetFileDropList
![]() |
GetImage
![]() |
GetText
![]() |
SetImage
![]() |
SetText
![]() |
Clear()

Clears the clipboard.
ContainsAudio()

True or False
returns True or False
ContainsFileDropList()

True or False
returns True or False
ContainsImage()

True or False
returns True or False
ContainsText()

True or False
returns True or False
GetFileDropList()

Get file drop list.
returns the list
GetImage(Path)

Get the image in clipboard.
Path the path to save the image
GetText()

Gets The Text in clipboard.
returns The text
SetImage(Path)

Set clipboard image
Path The image path
SetText(Text)

Set the text to clipboard.
Text the text to set
ZSCmd

Provides methods to execute command line instructions from Small Basic.
ChangeDirectory
![]() |
CopyFile
![]() |
CreateDirectory
![]() |
DeleteFile
![]() |
Execute
![]() |
ExecuteCommand
![]() |
ListDirectoryContents
![]() |
MoveFile
![]() |
PingHost
![]() |
RemoveDirectory
![]() |
Rename
![]() |
RunBatchScript
![]() |
RunBatchScriptFromArray
![]() |
ChangeDirectory(directoryPath)

Changes current directory using command line.
directoryPath Directory path to change to.
returns Output of the command execution.
CopyFile(source,destination)

Copies a file from source to destination using command line.
source Source file path.
destination Destination file path.
returns Output of the command execution.
CreateDirectory(directoryPath)

Creates a directory using command line.
directoryPath Directory path to create.
returns Output of the command execution.
DeleteFile(filePath)

Deletes a file using command line.
filePath File path to delete.
returns Output of the command execution.
Execute(command)

Executes a command in the command line and returns the output.
command The command to execute.
returns The output of the command execution.
ExecuteCommand(command)

Executes a command using the command line and captures the output.
command The command to execute.
returns The output of the command execution.
ListDirectoryContents(directoryPath)

Lists contents of a directory using command line.
directoryPath Directory path to list.
returns Output of the command execution.
MoveFile(source,destination)

Moves a file from source to destination using command line.
source Source file path.
destination Destination file path.
returns Output of the command execution.
PingHost(host)

Pings a host using command line.
host Host to ping.
returns Output of the command execution.
RemoveDirectory(directoryPath)

Removes a directory using command line.
directoryPath Directory path to remove.
returns Output of the command execution.
Rename(oldPath,newPath)

Renames a file or directory using command line.
oldPath Current path of the file or directory.
newPath New path to rename to.
returns Output of the command execution.
RunBatchScript(script)

Executes a batch script directly from a single string.
script The batch script to execute.
returns A string containing the output and errors from the batch script execution.
RunBatchScriptFromArray(scriptLines)

Executes a batch script provided as an array of strings.
Saves the script in a temporary file, runs it, returns the output, and deletes the script file.
scriptLines Array of strings, each representing a line of the batch script.
returns A string containing the output and errors from the batch script execution.
ZSControl

Extended Controls For Graphics Window.
KeyDown
![]() |
KeyDown(Shape,Sub)

Add Key Down Event To Shape.
Shape The Shape Name
Sub The Sub Name.
ZSDialog

Provides various dialog utilities such as message boxes, input dialogs, file dialogs, and color dialogs.
ShowColorDialog()

Shows a color dialog and returns the selected color as a string.
returns The selected color in hexadecimal format (e.g., #FF0000 for red).
ShowConfirmationDialog(text,title)

Shows a confirmation dialog with specified text and title.
text The text to display in the confirmation dialog.
title The title of the confirmation dialog.
returns Returns true if Yes is clicked, otherwise returns false.
ShowCustomColorDialog()

Shows a color dialog and returns the selected color as a string in the format "R,G,B".
returns The selected color or an empty string if canceled.
ShowCustomMessageBox(text,title,buttons)

Shows a custom message box with specified text, title, and buttons.
text The text to display in the message box.
title The title of the message box.
buttons The buttons to display in the message box (OK, OKCancel, YesNo).
returns The text of the button that was clicked.
ShowDatePickerDialog()

Shows a date picker dialog and returns the selected date.
returns The selected date in the format "yyyy-MM-dd".
ShowErrorDialog(errorMessage)

Shows an error dialog with the specified error message.
errorMessage The error message to display in the dialog.
ShowFolderBrowserDialog()

Shows a folder browser dialog and returns the selected folder path.
returns The path of the selected folder.
ShowFontDialog()

Shows a font dialog and returns the selected font as a string.
returns The selected font in the format "FontName, Size, Style".
ShowImageFileDialog()

Shows a file dialog to select an image file and returns the selected file path.
returns The path of the selected image file or an empty string if canceled.
ShowInformationDialog(informationMessage)

Shows an information dialog with the specified information message.
informationMessage The information message to display in the dialog.
ShowInputDialog(prompt)

Shows a custom input dialog with the specified prompt text.
prompt The prompt text to display in the input dialog.
returns The text entered by the user.
ShowInputDialogWithOptions(prompt,title,options)

Shows an input dialog with options and returns the selected option.
prompt The prompt to display in the input dialog.
title The title of the input dialog.
options The list of options to choose from.
returns The selected option or an empty string if canceled.
ShowMessageBox(text)

Shows a message box with the specified text.
text The text to display in the message box.
ShowMultiLineInputBox(prompt,title)

Shows an input box with a multi-line text box for larger input.
prompt The prompt to display in the input box.
title The title of the input box.
returns The user input or an empty string if canceled.
ShowMultiSelectOpenFileDialog(filter)

Shows an open file dialog with multi-select enabled and returns the selected file paths.
filter The file types filter in the format "Display Name1|Pattern1|Display Name2|Pattern2|...".
returns A semicolon-separated list of selected file paths or an empty string if canceled.
remarks Filters should be specified in pairs where:
- Display Name: The name shown in the dialog's filter dropdown.
- Pattern: The file pattern to filter files by extension (e.g., "*.txt", "*.jpg").
Multiple filters can be separated by vertical bars ('|'). For example:
"Text Files|*.txt|All Files|*.*"
ShowOpenFileDialog()

Shows a file open dialog and returns the selected file path.
returns The path of the selected file.
ShowPasswordInputDialog(prompt,title)

Shows a password input dialog and returns the entered password.
prompt The prompt to display in the input dialog.
title The title of the input dialog.
returns The entered password or an empty string if canceled.
ShowProgressDialog(message,durationInSeconds)

Shows a progress dialog with a specified message and duration.
message The message to display in the progress dialog.
durationInSeconds The duration in seconds for which the progress dialog should be displayed.
ShowSaveFileDialog()

Shows a file save dialog and returns the selected file path.
returns The path of the file to save.
ShowTimePickerDialog()

Shows a time picker dialog and returns the selected time.
returns The selected time in the format "HH:mm:ss".
ShowWarningDialog(warningMessage)

Shows a warning dialog with the specified warning message.
warningMessage The warning message to display in the dialog.
ShowYesNoDialog(question)

Shows a Yes/No dialog with the specified question text.
question The question text to display in the dialog.
returns Returns "Yes" if Yes is clicked, otherwise returns "No".
ZSEnvironment

Provides System.Environment Functions For Small Basic.
CommandLine

Gets the command line for the application.
return The command line arguments for the application.
CurrentDirectory

Gets or sets the fully qualified path of the current working directory.
return The path of the current working directory.
Exit(exitCode)

Terminates the process and gives the exit code to the operating system.
exitCode The exit code to pass to the operating system.
GetCommandLineArgs()

Returns the command-line arguments for the process as a single string with arguments separated by a delimiter.
returns A string representing the command-line arguments, separated by commas.
GetEnvironmentVariable(variable)

Retrieves the value of an environment variable.
variable The name of the environment variable.
returns The value of the environment variable.
GetEnvironmentVariable(variable,target)

Retrieves the value of an environment variable, using the specified target.
variable The name of the environment variable.
target The target for the environment variable.
returns The value of the environment variable.
GetLogicalDrives()

Returns the names of the logical drives on the current machine.
returns An array of strings representing the names of the logical drives.
GetResourceString(key)

Retrieves the value of a resource string by its key.Currently WILL Give Nothing
key The key of the resource string.
returns The value of the resource string.
MachineName

Gets the name of the machine on which the application is running.
return The name of the machine.
NewLine

Gets a string representing the newline character(s) used by the current environment.
return The newline characters used by the current environment.
OSVersion

Gets an OperatingSystem object that describes the current platform.
return The current platform as a string.
ProcessorCount

Gets the number of processors on the current machine.
return The number of processors.
SetEnvironmentVariable(variable,value)

Sets the value of an environment variable.
variable The name of the environment variable.
value The value to set for the environment variable.
SetEnvironmentVariable(variable,value,target)

Sets the value of an environment variable, using the specified target.
variable The name of the environment variable.
value The value to set for the environment variable.
target The target for the environment variable.
StackTrace

Gets a string representation of the current call stack.
value The current call stack as a string.
SystemDirectory

Gets the full path of the system directory.
value The path to the system directory.
TickCount

Gets the number of milliseconds elapsed since the system started.
value The number of milliseconds since the system started.
UserDomainName

Gets the domain name of the current user.
value The domain name of the current user.
UserName

Gets the user name of the current thread.
value The user name of the current thread.
Version

Gets the version of the common language runtime (CLR) that is installed on the operating system.
value The version of the CLR.
WorkingSet

Gets the amount of physical memory allocated for the process.
value The amount of physical memory allocated for the process, in bytes.
ZSEvent

some function related to events.
CallSub
![]() |
HookEventToSBSub
![]() |
Lasteventargs
![]() |
sender
![]() |
CallSub()

Invokes a Small Basic subroutine using reflection.
HookEventToSBSub()

Hooks a .NET event to a Small Basic subroutine.
Lasteventargs

Last event args to string.
sender

Last event sender to string.
ZSFile

Provides File Functions For Small Basic.
AppendToFile(filePath,content)

Appends content to an existing file.
filePath The path of the file to append to.
content The content to append.
returns "Success" if the operation was successful; otherwise, an error message.
CopyFile(sourcePath,destinationPath)

Copies a file to a new location.
sourcePath The path of the file to copy.
destinationPath The path where the file will be copied to.
returns "Success" if the operation was successful; otherwise, an error message.
CreateDirectory(directoryPath)

Creates a directory.
directoryPath The path of the directory to create.
returns "Success" if the operation was successful; otherwise, an error message.
CreateTextFile(filePath,content)

Creates a text file with specified content.
filePath The path of the file to create.
content The content to write to the file.
returns "Success" if the operation was successful; otherwise, an error message.
DeleteDirectory(directoryPath,recursive)

Deletes a directory and optionally all its contents.
directoryPath The path of the directory to delete.
recursive True to delete the directory, its subdirectories, and all files; otherwise, false.
returns "Success" if the operation was successful; otherwise, an error message.
DeleteDirectory(directoryPath)

Deletes a directory.
directoryPath The path of the directory to delete.
returns "Success" if the operation was successful; otherwise, an error message.
DeleteFile(filePath)

Deletes a file.
filePath The path of the file to delete.
returns "Success" if the operation was successful; otherwise, an error message.
DirectoryExists(directoryPath)

Checks if a directory exists.
directoryPath The path of the directory to check.
returns True if the directory exists; otherwise, false.
FileExists(filePath)

Checks if a file exists.
filePath The path of the file to check.
returns True if the file exists; otherwise, false.
GetFileAttributes(filePath)

Retrieves the attributes of a file.
filePath The path of the file to get the attributes of.
returns The attributes of the file, or an error message if an exception occurs.
GetFileCreationTime(filePath)

Retrieves the creation time of a file.
filePath The path of the file to retrieve the creation time from.
returns A string representation of the creation time, or an error message if an exception occurs.
GetFileExtension(filePath)

Retrieves the extension of a file.
filePath The path of the file to get the extension of.
returns The extension of the file, or an error message if an exception occurs.
GetFileLastAccessTime(filePath)

Retrieves the last access time of a file.
filePath The path of the file to retrieve the last access time from.
returns A string representation of the last access time, or an error message if an exception occurs.
GetFileName(filePath)

Retrieves the file name and extension of a file path.
filePath The path of the file to retrieve the name from.
returns The file name and extension, or an error message if an exception occurs.
GetFileSize(filePath)

Retrieves the size of a file.
filePath The path of the file to get the size of.
returns The size of the file in bytes, or an error message if an exception occurs.
GetLastWriteTime(filePath)

Retrieves the last write time of a file.
filePath The path of the file to retrieve the last write time from.
returns A string representation of the last write time; or an error message if an exception occurs.
ListFiles(directoryPath)

Lists all files in a directory.
directoryPath The path of the directory to list files from.
returns A comma-separated string of file paths.
MoveDirectory(sourcePath,destinationPath)

Moves a directory to a new location.
sourcePath The current path of the directory to move.
destinationPath The new path for the directory.
returns "Success" if the operation was successful; otherwise, an error message.
MoveFile(sourcePath,destinationPath)

Moves a file to a new location.
sourcePath The path of the file to move.
destinationPath The path where the file will be moved to.
returns "Success" if the operation was successful; otherwise, an error message.
ReadAllLines(filePath)

Reads all lines from a file.
filePath The path of the file to read from.
returns A list of all lines in the file, or an error message if an exception occurs.
ReadFile(filePath)

Reads the content of a file.
filePath The path of the file to read.
returns The content of the file.
RenameFile(currentFilePath,newFilePath)

Renames a file.
currentFilePath The current path of the file to rename.
newFilePath The new path and name for the file.
returns "Success" if the operation was successful; otherwise, an error message.
WriteFile(filePath,content)

Writes content to a file.
filePath The path of the file to write to.
content The content to write.
returns "Success" if the operation was successful; otherwise, an error message.
ZSGlobalization

Provides methods and properties for working with globalization, including culture information, date and time formatting, number formatting, and text information.
This class also includes support for various calendars such as Gregorian, Hijri, Chinese, and Korean.
Calendar

Gets the name of the calendar used by the current culture. Example: "GregorianCalendar"
ChineseDate

Gets the current date in the Chinese calendar.
CurrencySymbol

Gets or sets the currency symbol. Example: "$"
example Get the currency symbol:
br code currencySymbol = ZSGlobalization.CurrencySymbol
br Set the currency symbol to Euro:
br code ZSGlobalization.CurrencySymbol = "€"
CurrentCulture

Gets or sets the current culture. Example: "en-US"
example Get the current culture:
br code currentCulture = ZSGlobalization.CurrentCulture
br Set the current culture to French (France):
br code ZSGlobalization.CurrentCulture = "fr-FR"
GetCultures()

Get All Cultures.
returns The Array of Cultures Name.
GregorianDate

Gets the current date in the Gregorian calendar.
HijriDate

Gets the current date in the Hijri calendar.
KoreanDate

Gets the current date in the Korean calendar.
LongDatePattern

Gets or sets the date and time pattern for long dates. Example: "dddd, MMMM dd, yyyy"
example Get the long date pattern:
br code longDatePattern = ZSGlobalization.LongDatePattern
br Set the long date pattern to day of week, day month year:
br code ZSGlobalization.LongDatePattern = "dddd, dd MMMM yyyy"
NativeName

Gets the native name of the language of the current culture. Example: "English"
NumberDecimalSeparator

Gets or sets the number decimal separator. Example: "."
example Get the number decimal separator:
br code decimalSeparator = ZSGlobalization.NumberDecimalSeparator
br Set the number decimal separator to a comma:
br code ZSGlobalization.NumberDecimalSeparator = ","
ShortDatePattern

Gets or sets the date and time pattern for short dates. Example: "MM/dd/yyyy"
example Get the short date pattern:
br code shortDatePattern = ZSGlobalization.ShortDatePattern
br Set the short date pattern to day/month/year:
br code ZSGlobalization.ShortDatePattern = "dd/MM/yyyy"
TextInfo

Gets the text information (casing) of the current culture. Example: "Invariant"
example Get the text info:
br code textInfo = ZSGlobalization.TextInfo
ThreeLetterISOLanguageName

Gets the ISO 639-2 three-letter code for the language of the current culture. Example: "eng"
ThreeLetterWindowsLanguageName

Gets the Windows three-letter code for the language of the current culture. Example: "ENU"
TwoLetterISOLanguageName

Gets the ISO 639-1 two-letter code for the language of the current culture. Example: "en"
ZSImage

Provides Image Functions For Small Basic.
CaptureScreen
![]() |
GetImageHeight
![]() |
GetImageWidth
![]() |
IsImageInImage
![]() |
ResizeImage
![]() |
CaptureScreen(filePath)

Captures the entire screen and saves it as a PNG file.
filePath The file path where the screenshot will be saved.
returns True if the screen capture was successful; otherwise, false.
GetImageHeight(filePath)

Gets the height of an image.
filePath The file path of the image.
returns The height of the image.
GetImageWidth(filePath)

Gets the width of an image.
filePath The file path of the image.
returns The width of the image.
IsImageInImage(mainImagePath,subImagePath)

Determines if a sub-image is present within a main image.
mainImagePath The file path of the main image.
subImagePath The file path of the sub-image.
returns True if the sub-image is found within the main image, otherwise false.
ResizeImage(inputFilePath,outputFilePath,width,height)

Resizes an image to the specified width and height.
inputFilePath The file path of the input image.
outputFilePath The file path where the resized image will be saved.
width The width of the resized image.
height The height of the resized image.
returns True if the image resizing was successful; otherwise, false.
ZSKeyboard

Provides functions for simulating key presses and reading keyboard state.
GetActiveKeyboardLayoutId()

Gets the handle ID of the active keyboard layout.
returns Handle as integer.
GetActiveKeyboardLayoutLanguage()

Gets the layout name of the current input language.
returns The layout name.
GetCurrentKeyboardLayoutId()

Gets the handle of the current keyboard layout.
returns The layout handle as IntPtr.
GetCurrentKeyboardLayoutLanguageCode()

Gets the LCID (language code) of the active keyboard layout.
returns The LCID of the layout.
GetKeyboardLayout()

Gets the full name of the current keyboard layout's culture.
returns The display name of the current layout.
GetKeyboardLayoutsCount()

Gets the number of installed keyboard layouts.
returns Number of installed input languages.
GetKeyboardState()

Returns the state of all 256 keys.
returns Array of booleans indicating each key's state.
GetKeyState(key)

Gets whether a specific key is currently pressed.
key The key code (integer or string).
returns True if the key is down, otherwise false.
IsAltDown()

Checks if the Alt key is currently held down.
returns True if Alt is down, otherwise false.
IsCapsLockOn()

Checks if the Caps Lock key is on.
returns True if Caps Lock is on, otherwise false.
IsCtrlDown()

Checks if the Ctrl key is currently held down.
returns True if Ctrl is down, otherwise false.
IsNumLockOn()

Checks if the Num Lock key is on.
returns True if Num Lock is on, otherwise false.
IsScrollLockOn()

Checks if the Scroll Lock key is on.
returns True if Scroll Lock is on, otherwise false.
IsShiftDown()

Checks if the Shift key is currently held down.
returns True if Shift is down, otherwise false.
IsWindowsKeyDown()

Checks if the Windows key is currently held down.
returns True if Windows key is down, otherwise false.
PressAndReleaseKey(key)

Simulates pressing and releasing a key.
key The key to press and release.
PressKeyMultipleTimes(key,times)

Simulates pressing a key multiple times.
key The key to press.
times The number of times to press.
SendKey(key)

Sends a single key press to the system.
key The key to send.
SendKeyCombination(combo)

Sends a key combination to the system using SendKeys syntax.
Supported combinations:
^ = Ctrl (e.g., "^C" = Ctrl+C)
% = Alt (e.g., "%F4" = Alt+F4)
+ = Shift (e.g., "+A" = Shift+A)
Special keys:
{ENTER}, {TAB}, {ESC}, {BACKSPACE}, {DEL},
{F1} to {F12}, {LEFT}, {RIGHT}, {UP}, {DOWN}
You can also combine keys, for example:
"^+{ESC}" = Ctrl + Shift + Escape
combo The key combination string to send.
SetKeyboardLayout(layout)

Sets the keyboard layout.
layout The keyboard layout (e.g., "00000409" for US layout).
SimulateBackspaceKeyPress()

Simulates pressing the Backspace key.
SimulateDeleteKeyPress()

Simulates pressing the Delete key.
SimulateEnterKeyPress()

Simulates pressing the Enter key.
SimulateEscapeKeyPress()

Simulates pressing the Escape key.
SimulateKeyDown(key)

Simulates pressing down a key.
key The key to press down.
SimulateKeyUp(key)

Simulates releasing a key.
key The key to release.
SimulateTabKeyPress()

Simulates pressing the Tab key.
ToggleCapsLock()

Toggles the Caps Lock key.
TypeText(text)

Types a string as keyboard input.
text The text to type.
Wait(ms)

Waits for a specified number of milliseconds.
ms Time to wait in milliseconds.
ZSMath

Provides Powerful Math Functions For Small Basic.
Abs
![]() |
Acos
![]() |
Asin
![]() |
Atan
![]() |
Atan2
![]() |
Ceiling
![]() |
Cos
![]() |
Cosh
![]() |
DecimalToFraction
![]() |
E
![]() |
Exp
![]() |
Floor
![]() |
FractionToDecimal
![]() |
GCD
![]() |
IEEERemainder
![]() |
Log
![]() |
Log10
![]() |
Max
![]() |
Min
![]() |
PI
![]() |
Pow
![]() |
Round
![]() |
Sign
![]() |
Sin
![]() |
Sinh
![]() |
Sqrt
![]() |
Tan
![]() |
Tanh
![]() |
Truncate
![]() |
Abs(value)

Returns the absolute value of a specified number.
value A number whose absolute value is to be found.
returns The absolute value of the specified number.
Acos(d)

Returns the angle whose cosine is the specified number.
d A number representing a cosine, where d must be greater than or equal to -1, but less than or equal to 1.
returns The angle, measured in radians, whose cosine is the specified number.
Asin(d)

Returns the angle whose sine is the specified number.
d A number representing a sine, where d must be greater than or equal to -1, but less than or equal to 1.
returns The angle, measured in radians, whose sine is the specified number.
Atan(d)

Returns the angle whose tangent is the specified number.
d A number representing a tangent.
returns The angle, measured in radians, whose tangent is the specified number.
Atan2(y,x)

Returns the angle whose tangent is the quotient of two specified numbers.
y The y-coordinate of a point.
x The x-coordinate of a point.
returns The angle, measured in radians, whose tangent is the quotient of two specified numbers.
Ceiling(a)

Returns the smallest integer greater than or equal to the specified number.
a A number.
returns The smallest integer greater than or equal to the specified number.
Cos(d)

Returns the cosine of the specified angle.
d An angle, measured in radians.
returns The cosine of the specified angle.
Cosh(value)

Returns the hyperbolic cosine of the specified angle.
value An angle, measured in radians.
returns The hyperbolic cosine of the specified angle.
DecimalToFraction(decimalValue)

Converts a decimal number (fractional) to its fractional string representation.
decimalValue A decimal value to convert to a fraction.
returns A string representing the fraction (e.g., "1/2").
E

Represents the natural logarithmic base, specified by the constant, e.
Exp(d)

Returns e raised to the specified power.
d A number specifying a power.
returns The number e raised to the specified power.
Floor(d)

Returns the largest integer less than or equal to the specified number.
d A number.
returns The largest integer less than or equal to the specified number.
FractionToDecimal(fraction)

Converts a fraction string (e.g., "3/4") to its decimal representation.
fraction A fraction string to convert to decimal.
returns The decimal value of the fraction.
GCD(a,b)

Finds the greatest common divisor (GCD) of two numbers.
Used for simplifying fractions.
a The first number.
b The second number.
returns The greatest common divisor of the two numbers.
IEEERemainder(x,y)

Returns the remainder resulting from the division of a specified number by another specified number.
x A dividend.
y A divisor.
returns A number equal to x - (y * Q), where Q is the quotient of x / y rounded to the nearest integer.
Log(d)

Returns the natural (base e) logarithm of a specified number.
d A number whose logarithm is to be found.
returns The natural (base e) logarithm of the specified number.
Log10(d)

Returns the base 10 logarithm of a specified number.
d A number whose logarithm is to be found.
returns The base 10 logarithm of the specified number.
Max(val1,val2)

Returns the larger of two specified numbers.
val1 The first of two numbers to compare.
val2 The second of two numbers to compare.
returns The larger of the two numbers.
Min(val1,val2)

Returns the smaller of two specified numbers.
val1 The first of two numbers to compare.
val2 The second of two numbers to compare.
returns The smaller of the two numbers.
PI

Represents the ratio of the circumference of a circle to its diameter, specified by the constant, PI.
Pow(x,y)

Returns a specified number raised to the specified power.
x A double-precision floating-point number to be raised to a power.
y A double-precision floating-point number that specifies a power.
returns The number x raised to the power y.
Round(a)

Rounds a specified number to the nearest integer.
a A number to be rounded.
returns The integer nearest to the specified number.
Sign(value)

Returns a value indicating the sign of a number.
value A signed number.
returns A number indicating the sign of the specified number.
Sin(a)

Returns the sine of the specified angle.
a An angle, measured in radians.
returns The sine of the specified angle.
Sinh(value)

Returns the hyperbolic sine of the specified angle.
value An angle, measured in radians.
returns The hyperbolic sine of the specified angle.
Sqrt(d)

Returns the square root of a specified number.
d A number.
returns The square root of the specified number.
Tan(a)

Returns the tangent of the specified angle.
a An angle, measured in radians.
returns The tangent of the specified angle.
Tanh(value)

Returns the hyperbolic tangent of the specified angle.
value An angle, measured in radians.
returns The hyperbolic tangent of the specified angle.
Truncate(d)

Calculates the integral part of a specified number.
d A number to truncate.
returns The integral part of the specified number.
ZSNET

Some Powerful Net Function In Small Basic.
Keywords And Operators.
Add(num,addValue)

Adds a value to a number.
num Number
addValue Value to add
returns Sum of num and addValue
And(bool1,bool2)

Performs logical AND on two booleans.
bool1 First boolean
bool2 Second boolean
returns True if both are true, otherwise false
Apply(list,operation)

Applies an operation or function to each element in a comma-separated list of values.
list A comma-separated list of values
operation The operation to apply (e.g., "+1" to increment all values)
returns A new list of results with the operation applied
BitwiseAnd(int1,int2)

Performs bitwise AND on two integers.
int1 First integer
int2 Second integer
returns Result of bitwise AND
BitwiseNot(intVal)

Performs bitwise NOT on an integer.
intVal Integer to negate
returns Bitwise negation of the integer
BitwiseOr(int1,int2)

Performs bitwise OR on two integers.
int1 First integer
int2 Second integer
returns Result of bitwise OR
BitwiseXor(int1,int2)

Performs bitwise XOR on two integers.
int1 First integer
int2 Second integer
returns Result of bitwise XOR
Chain(value,operations)

Chains multiple operations to apply to a single value.
value The starting value
operations A comma-separated list of operations to chain
returns The result after all operations are applied
Clamp(num,min,max)

Clamps a number between a minimum and maximum value.
num The number to clamp
min The minimum allowed value
max The maximum allowed value
returns The clamped value
Coalesce(value1,value2)

Returns the first non-null value.
value1 First value
value2 Second value
returns First non-null value
Divide(num,divValue)

Divides a number by another value.
num Number
divValue Value to divide by
returns Quotient of num and divValue
Equal(val1,val2)

Checks if two values are equal.
val1 First value
val2 Second value
returns True if equal, otherwise false
Eval(expression)

Helper method to evaluate simple arithmetic expressions.
expression The expression to evaluate
returns The result of the evaluation
Filter(list,condition)

Filters a list of values based on a condition.
list A comma-separated list of values
condition The condition to apply (e.g., ">2" to filter values greater than 2)
returns A new list of values that meet the condition
ForEach(list,operation)

Applies an operation to each item in a list (e.g., increment all items by 1).
list A comma-separated list of values
operation The operation to apply to each item (e.g., "+1")
returns A new list with the operation applied
GreaterThan(num1,num2)

Checks if the first value is greater than the second value.
num1 First number
num2 Second number
returns True if num1 is greater than num2
GreaterThanOrEqual(num1,num2)

Checks if the first value is greater than or equal to the second value.
num1 First number
num2 Second number
returns True if num1 is greater than or equal to num2
InlineIf(expression,trueValue,falseValue)

Inline if (ternary operator) - evaluates a mathematical or boolean expression and returns one value if true, otherwise another value.
expression Mathematical or boolean expression to evaluate (e.g., "5 > 2")
trueValue Value returned if the expression is true
falseValue Value returned if the expression is false
returns The trueValue if the expression is true, otherwise falseValue
Interpolate(template,args)

Interpolates values into a string template.
template The string template with placeholders (e.g., "Hello {0}")
args The values to replace the placeholders
returns The interpolated string
IsInRange(num,min,max)

Checks if a number is within a specified range (inclusive).
num The number to check
min The lower bound of the range
max The upper bound of the range
returns True if the number is within the range, otherwise false
LeftShift(num,shiftAmount)

Shifts the bits of a number to the left by the specified amount.
num Number
shiftAmount Amount to shift
returns Number shifted to the left
LessThan(num1,num2)

Checks if the first value is less than the second value.
num1 First number
num2 Second number
returns True if num1 is less than num2
LessThanOrEqual(num1,num2)

Checks if the first value is less than or equal to the second value.
num1 First number
num2 Second number
returns True if num1 is less than or equal to num2
Modulus(num,divisor)

Returns the remainder of the division between two numbers.
num The number to divide
divisor The number to divide by
returns The remainder of the division
Multiply(num,mulValue)

Multiplies a number by another value.
num Number
mulValue Value to multiply by
returns Product of num and mulValue
Negate(num)

Negates the number (changes the sign).
num The number to negate
returns The negated number
Not(Bool)

Converts True To False And Vice-Versa.
Bool The Bool True Or False
returns Negated Bool as True or False
NotEqual(val1,val2)

Checks if two values are not equal.
val1 First value
val2 Second value
returns True if not equal, otherwise false
Or(bool1,bool2)

Performs logical OR on two booleans.
bool1 First boolean
bool2 Second boolean
returns True if either or both are true, otherwise false
Reduce(list,operation)

Reduces a list of values to a single value by applying an operation (e.g., summing all values).
list A comma-separated list of values
operation The operation to apply (e.g., "+" to sum values)
returns The reduced result (e.g., sum of the list)
Repeat(iterations,Sub)

Repeats an action for the specified number of iterations.
iterations Number of times to repeat
Sub The action to repeat
returns True after completion
RightShift(num,shiftAmount)

Shifts the bits of a number to the right by the specified amount.
num Number
shiftAmount Amount to shift
returns Number shifted to the right
Subtract(num,subValue)

Subtracts a value from a number.
num Number
subValue Value to subtract
returns Difference of num and subValue
Xor(bool1,bool2)

Performs logical XOR on two booleans.
bool1 First boolean
bool2 Second boolean
returns True if one is true and the other is false
ZipWith(list1,list2,operation)

Combines two lists element-wise using a specified operation.
list1 First comma-separated list
list2 Second comma-separated list
operation Operation to apply, e.g., "+" to add elements
returns A new list with the operation applied to each pair of elements
ZSNetwork

Network related functions.
CheckUrlExists
![]() |
DnsResolve
![]() |
DownloadFile
![]() |
ExtractMetaTags
![]() |
Get
![]() |
GetHeaders
![]() |
GetHostName
![]() |
GetLocalIP
![]() |
GetMacAddress
![]() |
GetPublicIP
![]() |
IsInternetAvailable
![]() |
PingHost
![]() |
PortCheck
![]() |
Post
![]() |
TraceRoute
![]() |
UploadFile
![]() |
CheckUrlExists(url)

Checks if a URL exists and is reachable.
url The URL to check.
returns True if the URL exists, false otherwise.
DnsResolve(domain)

Resolves a domain name to its IP address.
domain The domain name to resolve.
returns The IP address of the domain.
DownloadFile(url,filePath)

Downloads a file from a given URL to the specified local path.
url The file URL.
filePath The local file path to save to.
returns Success or error message.
ExtractMetaTags(url)

Extracts meta tags from a webpage.
url The URL of the webpage.
returns A formatted string containing meta tag details.
Get(url)

Sends a GET request to the specified URL.
url The URL to send the GET request to.
returns The response content as a string.
GetHeaders(url)

Retrieves the headers from a given URL.
url The URL to fetch headers from.
returns The headers as a formatted string.
GetHostName()

Retrieves the hostname of the local machine.
returns The local machine's hostname.
GetLocalIP()

Retrieves the local IP address of the machine.
returns The local IP address.
GetMacAddress()

Retrieves the MAC address of the local machine.
returns The MAC address as a string.
GetPublicIP()

Gets the public IP address of the current machine.
returns The public IP address as a string.
IsInternetAvailable()

Checks if the internet connection is available.
returns True if connected, otherwise false.
PingHost(host)

Sends a ping request to a host and returns the response time.
host The host to ping (IP or domain).
returns The response time in milliseconds or an error message.
PortCheck(host,port)

Checks if a specific port is open on a given IP address or domain.
host The IP or domain to check.
port The port number to check.
returns True if the port is open, false otherwise.
Post(url,data)

Sends a POST request to the specified URL with the given data.
url The URL to send the POST request to.
data The data to send in the body of the request.
returns The response content as a string.
TraceRoute(host)

Performs a traceroute to a given host and returns the route details.
host The destination host (IP or domain).
returns The traceroute results as a string.
UploadFile(url,filePath)

Uploads a file to a specified server URL.
url The server URL to upload the file.
filePath The local file path to upload.
returns The server response or an error message.
ZSPath

Provides System.IO.Path Functions in small basic.
ChangeExtension(path,extension)

Changes the extension of a path string.
path The path information to modify.
extension The new extension. Specify null to remove an existing extension from path.
returns The modified path information.
Combine(path1,path2)

Combines two strings into a path.
path1 The first path to combine.
path2 The second path to combine.
returns The combined paths.
Combine3(path1,path2,path3)

Combines three strings into a path.
path1 The first path to combine.
path2 The second path to combine.
path3 The third path to combine.
returns The combined paths.
Combine4(path1,path2,path3,path4)

Combines four strings into a path.
path1 The first path to combine.
path2 The second path to combine.
path3 The third path to combine.
path4 The fourth path to combine.
returns The combined paths.
GetDirectoryName(path)

Returns the directory information for the specified path string.
path The path of a file or directory.
returns The directory information.
GetExtension(path)

Returns the extension of the specified path string.
path The path string from which to get the extension.
returns The extension of the specified path.
GetFileName(path)

Returns the file name and extension of the specified path string.
path The path string from which to obtain the file name and extension.
returns The characters after the last directory character in path.
GetFileNameWithoutExtension(path)

Returns the file name of the specified path string without the extension.
path The path of the file.
returns The string returned by GetFileName, minus the last period and all characters following it.
GetFullPath(path)

Returns the absolute path for the specified path string.
path The file or directory for which to obtain absolute path information.
returns The fully qualified location of path.
GetInvalidFileNameChars()

Returns an array containing the characters that are not allowed in file names.
returns An array containing the characters that are not allowed in file names.
GetInvalidPathChars()

Returns an array containing the characters that are not allowed in path names.
returns An array containing the characters that are not allowed in path names.
GetPathRoot(path)

Gets the root directory information of the specified path.
path The path from which to obtain root directory information.
returns A string containing the root directory of path.
GetRandomFileName()

Returns a random file name.
returns A random file name.
GetTempFileName()

Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.
returns The full path of the temporary file.
GetTempPath()

Returns the path of the current system's temporary folder.
returns The path to the temporary folder.
HasExtension(path)

Determines whether a path includes a file name extension.
path The path to search for an extension.
returns true if the path includes a file name extension; otherwise, false.
IsPathRooted(path)

Gets a value indicating whether the specified path string contains a root.
path The path to test.
returns true if path contains a root; otherwise, false.
ZSPowerShell

Provides methods for running PowerShell commands.
Run
![]() |
RunPowerShell
![]() |
RunPowerShellFile
![]() |
RunPowerShellScript
![]() |
RunPowerShellScriptFromArray
![]() |
Run(command)

Executes a PowerShell command and returns the result.
command The PowerShell command to execute.
returns A string containing the output and errors from the PowerShell command.
remarks This method starts a new PowerShell process to execute the specified command.
Output and errors are combined into a single string.
RunPowerShell(scriptLines)

Executes a PowerShell script provided as an array of strings.
Saves the script in a temporary file, runs it, returns the output, and deletes the script file.
scriptLines Array of strings, each representing a line of the PowerShell script.
returns A string containing the output and errors from the PowerShell script execution.
RunPowerShellFile(filePath)

Executes a PowerShell script file and returns the output.
filePath The path to the PowerShell script file.
returns A string containing the output and errors from the PowerShell script execution.
RunPowerShellScript(script)

Executes a PowerShell script directly from a single string.
script The PowerShell script to execute.
returns A string containing the output and errors from the PowerShell script execution.
RunPowerShellScriptFromArray(scriptLines)

Executes a PowerShell script provided as an array of strings.
scriptLines Array of strings, each representing a line of the PowerShell script.
returns A string containing the output and errors from the PowerShell script execution.
ZSProcess

Provides methods and properties for managing processes.
This class allows you to start new processes, manage process information, and interact with running processes.
It includes functionalities for:
- Starting processes with or without arguments
- Retrieving process IDs and names
- Getting and setting process-related information such as file path, arguments, priority, and more
Arguments

Gets or sets the arguments to pass to the executable file.
example To set arguments:
br ZSProcess.Arguments = "/c echo Hello World"
CreateNoWindow

Gets or sets a value that indicates whether to create a new window for the process.
example To disable window creation:
br ZSProcess.CreateNoWindow = true
FilePath

Gets or sets the file path of the application to start.
example To set the file path:
br ZSProcess.FilePath = "C:\\Windows\\System32\\notepad.exe"
GetExitTime()

Gets the exit time of the currently managed process.
returns The exit time of the process. Example: "2024-07-24 15:00:00"
GetMainWindowTitle()

Gets the title of the main window of the currently managed process.
returns The main window title. Example: "Untitled - Notepad"
GetProcessId()

Gets the process ID of the currently managed process.
returns The process ID. Example: 1234
GetProcessIds()

Gets a list of process IDs for all running processes on the local machine.
returns A comma-separated string of process IDs. Example: "1234,5678"
GetProcessName(id)

Gets the process name for a specified process ID.
id The process ID. Example: 1234
returns The process name. Example: "notepad"
GetStartTime()

Gets the start time of the currently managed process.
returns The start time of the process. Example: "2024-07-24 14:30:00"
GetTotalProcessorTime()

Gets the total processor time for the currently managed process.
returns The total processor time. Example: "00:00:01.2345678"
HasExited()

Gets a value indicating whether the currently managed process has exited.
returns true if the process has exited; otherwise, false.
IsResponding()

Gets a value indicating whether the currently managed process is responding.
returns true if the process is responding; otherwise, false.
PriorityClass

Gets or sets the value of the process priority.
example To set priority class:
br ZSProcess.PriorityClass = "High"
RedirectStandardOutput

Gets or sets a value that determines whether to redirect standard input, output, and error streams.
example To enable redirection:
br ZSProcess.RedirectStandardOutput = true
StartProcess(filePath)

Starts a new process with the specified executable file path.
filePath The path of the executable file to start. Example: "C:\\Windows\\System32\\notepad.exe"
StartProcessWithArgs(filePath,arguments)

Starts a new process with the specified executable file path and arguments.
filePath The path of the executable file to start. Example: "C:\\Windows\\System32\\cmd.exe"
arguments The arguments to pass to the executable file. Example: "/c echo Hello World"
StartProcessWithInfo(filePath,arguments)

Starts a new process with the specified ProcessStartInfo.
filePath The path of the executable file to start. Example: "C:\\Windows\\System32\\notepad.exe"
arguments The arguments to pass to the executable file. Example: ""
UseShellExecute

Gets or sets a value that indicates whether to use the operating system shell to start the process.
example To enable shell execution:
br ZSProcess.UseShellExecute = true
ZSProcessInfo

Provides ProcessInfo Functions from Small Basic.
First Set All the setting then call the method ZSProcessInfo.Start()
Arguments

Gets or sets the set of command-line arguments to use when starting the application.
Setting For ZSProcess.Start()
CreateNoWindow

Gets or sets a value indicating whether to start the process in a new window.
Setting For ZSProcess.Start()
Domain

Gets or sets the domain to use when starting the process.
Setting For ZSProcess.Start()
EnvironmentVariables

Gets or sets the environment variables that apply to this process and its child processes.
Use a semicolon (;) to separate multiple variables.
Example: "Path=C:\Windows\System32;TEMP=C:\Temp"
Setting For ZSProcess.Start()
ErrorDialog

Gets or sets a value indicating whether an error dialog box is displayed to the user if the process cannot be started.
Setting For ZSProcess.Start()
FileName

Gets or sets the application or document to start.
Setting For ZSProcess.Start()
GetOutput(processId)

Gets the output of the process by its ID.
Returns the standard output if available, otherwise returns an error message.
processId The ID of the process.
returns A string containing the process output or an error message.
LoadUserProfile

Gets or sets a value indicating whether the Windows user profile should be loaded.
Password

Gets or sets the password for the user name when starting the process.
Note: For security reasons, setting passwords is not directly supported in this wrapper.
Setting For ZSProcess.Start()
PasswordInClearText

Gets or sets the password in clear text to use when starting the process.
RedirectStandardError

Gets or sets a value indicating whether the error output of an application is written to the StandardError stream.
Setting For ZSProcess.Start()
RedirectStandardInput

Gets or sets a value indicating whether the input for an application is read from the StandardInput stream.
Setting For ZSProcess.Start()
RedirectStandardOutput

Gets or sets a value indicating whether the output of an application is written to the StandardOutput stream.
Setting For ZSProcess.Start()
StandardOutputEncoding

Gets or sets a value indicating whether the output of an application is written to the StandardOutput stream.
Setting For ZSProcess.Start()
Start()

Starts the process using the specified settings.
StartAndGetOutput()

Starts the process using the specified settings and returns the standard output.
Returns the standard output if the process starts and completes successfully, otherwise returns the error message.
returns A string containing the process output or an error message.
UserName

Gets or sets the user name to use when starting the process.
Setting For ZSProcess.Start()
UseShellExecute

Gets or sets a value indicating whether to use the operating system shell to start the process.
Setting For ZSProcess.Start()
Verb

Gets or sets the verb to use when opening the application or document specified by the FileName property.
Setting For ZSProcess.Start()
WindowStyle

Gets or sets the Window style to use for the process.
Setting For ZSProcess.Start()
WorkingDirectory

Gets or sets the working directory for the process to be started.
Setting For ZSProcess.Start()
ZSReflection

The Reflection For Small Basic.
Used by many extension classes.
GetEvents(Type)

Gets A Array of Events in a type.
Type The Type Key.
returns Array of Events.
GetField(Key,FieldName)

Gets a field's value with type safety.
Key The Type Key
FieldName The Field Name.
returns The Result.
GetFieldInfo(targetType,fieldName)

Retrieves the FieldInfo of a specified field.
targetType The type containing the field.
fieldName The name of the field to retrieve.
returns The FieldInfo if found, otherwise null.
GetFields(Type)

Gets A Array of Fields in a type.
Type The Type Key.
returns Array of Fields.
GetFieldValue(targetType,fieldName)

Retrieves the value of a field from the specified type.
targetType The type containing the field.
fieldName The name of the field to retrieve.
returns The value of the specified field, or null if the field is not found.
GetMethods(Type)

Gets A Array of methods in a type.
Type The Type Key.
returns Array of methods.
GetPre(Option)

Get Some Predefined Types And Assembly.
Option 1 - Current Program.
2 - Current Class of program.
3 - Assembly Key Of SmallBasicLibaray.dll
4 - Assembly Key Of ZS.dll
returns The Result
GetProperties(Type)

Gets A Array of Properties:(getters and setters). in a type.
Type The Type Key.
returns Array of Properties.
GetProperty(Key,PropertyName)

Gets the property value with type safety.
Key The Type Key.
PropertyName The Property Name.
returns The Result.
GetPropertyInfo(targetType,propertyName)

Retrieves the PropertyInfo of a specified property.
targetType The type containing the property.
propertyName The name of the property to retrieve.
returns The PropertyInfo if found, otherwise null.
GetTypes(Key)

Get All Types in a assembly.
Key The Key
returns Array of name of types.
InvokeMethod(targetType,methodName,methodArgs)

Invokes a method from the specified type.
targetType The type containing the method.
methodName The name of the method to invoke.
methodArgs The arguments to pass to the method.
returns The result of the method invocation, or null if the method is void or not found.
InvokeMethod(Type,Method,Args)

Invokes a method from type.
Type The Type Key.
Method The Method Name.
Args The Array Of Parameters.
returns The Result.
InvokeStaticMethod(Path,Class,Method,parameters)

Invokes A Static Method.
Path The Path to dll.
Class The Namespace.Class
Method The Method Name
parameters The array of Parameters
returns The Result
LoadAssembly(Path)

Loads A Assembly.
A exe or dll is assembly.
Path The Path Of Assembly.
returns The Assembly Key.
LoadType(Key,Type)

Loads A Type.
Key The Assembly Key.
Type The Type Name (e.g., 'Namespace.ClassName').
returns The Type Key
MethodDetail(Key,Method,Option)

Retrieves details about a specified method from a given type.
Key The key representing the type from which to retrieve the method.
Method The name of the method to retrieve details for.
Option 1 - Method Name.
2 - Method Description.
3 - Method Attributes.
4 - Parameter Types.
5 - Return Type.
6 - Method Handle.
7 - IL Code as a byte array.
8 - Maximum Stack Size.
9 - Local Variables (index and type).
returns The requested detail about the method.
SetField(Key,FieldName,Value)

Sets a field's value with type safety.
Key The Type Key.
FieldName The Field Name.
Value The Value To Set.
SetFieldValue(targetType,fieldName,value)

Sets the value of a field in the specified type.
targetType The type containing the field.
fieldName The name of the field to set.
value The new value for the field.
SetProperty(Key,PropertyName,Value)

Sets a property value with type safety.
Key The Type Key.
PropertyName The Property Name.
Value The Value To Set.
TypeDetails(Key,Option)

Retrieves details about a type based on a specified key and option.
Key The key used to identify the type from a collection.
Option 1 - Assembly qualified name: The full name of the type including its namespace and assembly.
2 - Attributes: The attributes associated with the type, represented as a string.
3 - Full name: The fully qualified name of the type, including its namespace.
4 - GUID: The unique identifier (GUID) associated with the type.
5 - Is enum: Indicates whether the type is an enumeration (true/false).
6 - Is visible: Determines if the type is visible outside its assembly (true/false).
7 - Name: The name of the type without its namespace.
8 - Namespace: The namespace the type belongs to.
9 - Type handle: The runtime handle for the type, useful for low-level type operations.
returns Returns the requested detail about the specified type based on the provided option.
ZSRegex

Regex In SB.
CountMatches
![]() |
EndsWith
![]() |
Escape
![]() |
FindAll
![]() |
GetGroups
![]() |
IsExactMatch
![]() |
IsMatch
![]() |
Match
![]() |
RemoveWhitespace
![]() |
Replace
![]() |
Split
![]() |
StartsWith
![]() |
CountMatches()

Returns the number of matches found for the regex pattern in the input string.
EndsWith()

Checks if the input string ends with the regex pattern.
Escape()

Escapes special regex characters in the input string.
FindAll()

Finds all matches of the regex pattern in the input string and returns an array of matched values.
GetGroups()

Gets the groups captured by the regex pattern from the input string and returns an array of group values.
IsExactMatch()

Validates if the entire input string matches the regex pattern.
IsMatch()

Matches the regex pattern in the input string and returns true if it finds a match.
Match()

Searches the input string for the first occurrence of the regex pattern and returns the matched value.
RemoveWhitespace()

Returns a string that contains the input string with all whitespace removed.
Replace()

Replaces all occurrences of the regex pattern in the input string with the replacement string.
Split()

Splits the input string based on the regex pattern and returns an array of substrings.
StartsWith()

Checks if the input string starts with the regex pattern.
ZSStorage

The Isolated Storage For Small Basic.
You Can Store Your Varibles Here For Permenatly Even if the exe close.
Default File Name Is None.
Use Delete Storage For Deleting The File.
DeleteStorageFile
![]() |
GetValue
![]() |
ListVars
![]() |
SetFileName
![]() |
SetValue
![]() |
DeleteStorageFile()

Deletes the file.
GetValue(Name)

Gets the value for a give variable.
Name The name of variable.
returns The value for variable or a empty string if no variable with name.
ListVars()

List the varibles stored in file.
returns
SetFileName(FileName)

Set the file name for current.
FileName the file name
SetValue(Name,value)

Sets A Value for a variable.
Name The Name Of Variable.
value The value to store.
ZSTask

Provides methods to use tasks in Small Basic.
IsRunning
![]() |
RunSub
![]() |
Status
![]() |
WaitForTask
![]() |
WaitForTask
![]() |
IsRunning(TaskID)

Checks if a task is still running.
TaskID The ID of the task to check.
returns True if the task is running, false otherwise.
RunSub(SubName)

Runs a subroutine as a new task.
SubName The name of the subroutine to run.
returns The ID of the created task.
Status(TaskID)

Get the status of a task
TaskID The ID of the task.
returns The status of task.
WaitForTask(TaskID)

Waits for a task to complete.
TaskID The ID of the task to wait for.
WaitForTask(TaskID,Time)

Waits for a task to complete.
TaskID The ID of the task to wait for.
Time The time in milisecond to wait for.
ZSTest

Just For Testing.
Fire
![]() |
FireEvent
![]() |
FireSub
![]() |
Ops
![]() |
Variables
![]() |
Fire()

Fires The Event.
FireEvent

This Event Can Be Fired From Method ZSTest.Fire
FireSub(SubName)

Fires A Sub.
SubName The Sub Name
Ops(Bool)

Converts True To False And Vice-Versa.
Bool The Bool True Or False
returns Ops String
Variables()

Return A Array Of All Variables In This App.
ZSText

Provides a comprehensive set of text manipulation functions, enhancing the capability of Small Basic programs to process and transform strings with ease.
AngleBracketClose

Gets the angle bracket closing character '>'.
BraceClose

Gets the curly brace closing character '}'.
BraceOpen

Gets the curly brace opening character '{'.
BracketClose

Gets the square bracket closing character ']'.
BracketOpen

Gets the square bracket opening character '['.
Colon

Gets the colon character ":".
Comma

Gets the comma character ",".
Contains(input,value)

Checks if the input text contains the specified value.
input The text to search in.
value The value to search for.
returns True if the input text contains the value, otherwise false.
CountOccurrences(text,substring)

Counts the occurrences of a substring within the input text.
text The text to search within.
substring The substring to count.
returns The number of occurrences of the substring in the text.
Dash

Gets the dash character "-".
EndsWith(input,value)

Checks if the input text ends with the specified value.
input The text to check.
value The value to check for.
returns True if the input text ends with the value, otherwise false.
EndsWithSuffix(text,suffix)

Checks if the input text ends with the specified suffix.
text The text to check.
suffix The suffix to check against.
returns True if the text ends with the suffix, otherwise false.
ExclamationMark

Gets the exclamation mark character "!".
HtmlDecode(input)

Decodes the input text from HTML entities.
input The HTML-encoded text to be decoded.
returns The decoded text.
HtmlEncode(input)

Encodes the input text into HTML entities.
input The text to be encoded.
returns The HTML-encoded text.
IndexOf(input,value)

Finds the index of the specified value in the input text.
input The text to search in.
value The value to find.
returns The index of the value in the input text, or -1 if not found.
Length(input)

Gets the length of the input text.
input The text to measure.
returns The length of the input text.
NewLine

Gets the newline character "\n".
ParenthesesClose

Gets the parentheses closing character ')'.
ParenthesesOpen

Gets the parentheses opening character '('.
Period

Gets the period character ".".
QuestionMark

Gets the question mark character "?".
QuotationMark

Gets the quotation mark character '"'.
Replace(input,oldValue,newValue)

Replaces occurrences of a specified value in the input text with another value.
input The text to be modified.
oldValue The value to be replaced.
newValue The value to replace with.
returns The modified text with replacements.
Reverse(input)

Reverses the input text.
input The text to be reversed.
returns The reversed text.
Semicolon

Gets the semicolon character ";".
SingleQuote

Gets the single quote character '\''.
Split(input,delimiter)

Splits the input text into an array of substrings based on a delimiter.
input The text to be split.
delimiter The delimiter to split by.
returns An array of substrings.
SplitWithoutEmpty(input,delimiter)

Splits the input text into an array of substrings based on a delimiter.
Removes The Empty.
input The text to be split.
delimiter The delimiter to split by.
returns An array of substrings.
StartsWith(input,value)

Checks if the input text starts with the specified value.
input The text to check.
value The value to check for.
returns True if the input text starts with the value, otherwise false.
StartsWithPrefix(text,prefix)

Checks if the input text starts with the specified prefix.
text The text to check.
prefix The prefix to check against.
returns True if the text starts with the prefix, otherwise false.
Substring(input,startIndex,length)

Extracts a substring from the input text.
input The text to extract from.
startIndex The starting index of the substring.
length The length of the substring.
returns The extracted substring.
Tab

Gets the tab character "\t".
ToCamelCase(input)

Converts a string to camelCase format.
input The input text to convert.
returns The input text in camelCase format.
ToLower(input)

Converts the input text to lowercase.
input The text to be converted.
returns The lowercase version of the input text.
ToTitleCase(input)

Converts the first letter of each word in the input text to uppercase.
input The text to be converted.
returns The converted text with each word's first letter in uppercase.
ToUpper(input)

Converts the input text to uppercase.
input The text to be converted.
returns The uppercase version of the input text.
Trim(input)

Trims leading and trailing whitespace from the input text.
input The text to be trimmed.
returns The trimmed text.
Underscore

Gets the underscore character "_".
UrlDecode(input)

Decodes the input text from URL format.
input The URL-encoded text to be decoded.
returns The decoded text.
UrlEncode(input)

Encodes the input text into URL format.
input The text to be URL-encoded.
returns The URL-encoded text.
ZSThread

Provides methods to use multiple threads in Small Basic.
IsAlive
![]() |
RunSub
![]() |
TerminateThread
![]() |
ThreadState
![]() |
WaitForThread
![]() |
IsAlive(Threadid)

Gets a value indicating the execution status of the current thread.
Threadid The Thread ID
returns true if this thread has been started and has not terminated normally or aborted; otherwise, false.
RunSub(SubName)

Runs a subroutine on a new thread.
SubName The name of the subroutine to run.
returns The ID of the created thread.
TerminateThread(ThreadId)

Terminates a thread by its ID.
ThreadId The ID of the thread to terminate.
ThreadState(Threadid)

Gets a value containing the states of the current thread.
Threadid The Thread ID
returns ne of the ThreadState values indicating the state of the current thread. The initial value is Unstarted.
WaitForThread(ThreadId)

Waits for a thread to complete.
ThreadId The ID of the thread to wait for.
ZSUtilities

Provides General Utilities Functions For Small Basic.
CalculateAge(birthdate)

Calculates the age of a person given their birthdate.
birthdate The birthdate to calculate the age from.
returns The age in years.
CalculateCompoundInterest(principal,rate,periods,years)

Calculates compound interest over a specified number of periods.
principal The principal amount.
rate The annual interest rate (as a decimal).
periods The number of periods per year.
years The number of years the money is invested for.
returns The compound interest amount.
CalculateGCD(a,b)

Calculates the greatest common divisor (GCD) of two integers using the Euclidean algorithm.
a The first integer.
b The second integer.
returns The GCD of the two integers.
CalculateHypotenuse(a,b)

Calculates the length of the hypotenuse in a right triangle given the lengths of the other two sides.
a The length of one side.
b The length of the other side.
returns The length of the hypotenuse.
CalculateSquareRoot(a)

Calculates the square root of a number.
a The number.
returns The square root of a.
CaptureActiveWindow(filePath)

Captures a screenshot of the active window and saves it as an image file.
filePath The path where the image file will be saved.
CaptureScreenSegment(x,y,width,height,filePath)

Captures a segment of the screen and saves it as an image file.
x The x-coordinate of the upper-left corner of the segment.
y The y-coordinate of the upper-left corner of the segment.
width The width of the segment.
height The height of the segment.
filePath The path where the image file will be saved.
CheckIs64BitOperatingSystem()

Checks if the current operating system is 64-bit.
returns True if the operating system is 64-bit, otherwise false.
CheckIs64BitProcess()

Checks if the current process is running in 64-bit mode.
returns True if the process is 64-bit, otherwise false.
ContainsOnlyLetters(text)

Checks if a given string contains only letters.
text The string to check.
returns True if the string contains only letters, otherwise false.
ConvertBase(number,fromBase,toBase)

Converts a number from one base to another base.
number The number to convert.
fromBase The base of the input number.
toBase The base to convert the number to.
returns The converted number as a string.
ConvertColorToHex(color)

Converts a color from its RGB components to a hexadecimal string.
color The color in RGB string format.
returns The color in hexadecimal format.
ConvertFromBase64(base64)

Converts a Base64 encoded string back to its original string representation.
base64 The Base64 encoded string.
returns The decoded string.
ConvertToBase64(text)

Converts a given string to Base64 encoding.
text The string to encode.
returns The Base64 encoded string.
ConvertToLowerCase(input)

Converts the given string to lowercase.
input The string to convert.
returns The lowercase version of the input string.
ConvertToTitleCase(text)

Converts a given string to title case (each word starts with a capital letter).
text The text to convert.
returns The text in title case.
ConvertToUpperCase(input)

Converts the given string to uppercase.
input The string to convert.
returns The uppercase version of the input string.
CountVowels(text)

Counts the number of vowels in a given string.
text The text to count vowels in.
returns The number of vowels in the text.
CountWords(text)

Counts the number of words in a given string.
text The text to count words in.
returns The number of words in the text.
CreateDirectory(path)

Creates a directory at the specified path.
path The path of the directory to create.
DownloadFile(url,destinationPath)

Downloads a file from the specified URL to the specified destination path.
url The URL of the file to download.
destinationPath The path where the file will be saved.
Factorial(number)

Calculates the factorial of a given number.
number The number to calculate the factorial for.
returns The factorial of the number.
FindMax(array)

Finds the maximum value in an array of numbers.
array The array to search.
returns The maximum value in the array.
FindMedian(array)

Finds the median value in a given array of numbers.
array The array of numbers.
returns The median value of the array.
FindMin(array)

Finds the minimum value in an array of numbers.
array The array to search.
returns The minimum value in the array.
FindSubstrings(text,length)

Finds all substrings of a specified length from a given string.
text The text to extract substrings from.
length The length of each substring.
returns An array of substrings of the specified length.
GenerateFibonacciSequence(length)

Generates a Fibonacci sequence of a given length.
length The length of the Fibonacci sequence.
returns An array containing the Fibonacci sequence.
GeneratePrimesUpTo(limit)

Generates a list of prime numbers up to a specified number.
limit The upper limit to generate prime numbers up to.
returns An array of prime numbers up to the specified limit.
GenerateRandomNumber(min,max)

Generates a random number between the specified minimum and maximum values.
min The minimum value.
max The maximum value.
returns A random number between min and max.
GenerateRandomPassword(length)

Generates a random password of a specified length containing letters and digits.
length The length of the password.
returns The generated password.
GenerateUUID()

Generates a unique identifier (UUID) as a string.
returns A UUID string.
GetActiveWindowTitle()

Gets the title of the currently active window.
returns The title of the active window.
GetAllDrives()

Gets a list of all drive names on the current computer.
returns A comma-separated list of drive names.
GetAppDomainName()

Gets the name of the current application domain.
returns The name of the current application domain.
GetAssemblyVersion()

Gets the version of the currently executing assembly.
returns The version of the current assembly.
GetBatteryStatus()

Gets the battery charge status.
returns The battery charge status as a percentage.
GetClipboardText()

Gets the current text content from the clipboard.
returns The text content from the clipboard, or an empty string if the clipboard is empty or does not contain text.
GetColorFromRGB(red,green,blue)

Gets a color from its RGB components.
red The red component (0-255).
green The green component (0-255).
blue The blue component (0-255).
returns The color in string format.
GetCpuUsage()

Gets the current CPU usage percentage.
returns The current CPU usage percentage.
GetCurrentCulture()

Gets the current culture name.
returns The name of the current culture.
GetCurrentDate()

Returns the current system date as a string.
returns The current system date in yyyy-MM-dd format.
GetCurrentDirectory()

Gets the current working directory.
returns The current working directory.
GetCurrentDirectoryFiles()

Gets a list of all files in the current directory.
returns A comma-separated list of file names in the current directory.
GetCurrentManagedThreadId()

Gets the ID of the current managed thread.
returns The ID of the current managed thread.
GetCurrentProcessId()

Gets the process ID of the current process.
returns The process ID of the current process.
GetCurrentProcessMemoryUsage()

Gets the memory usage of the current process in bytes.
returns The memory usage of the current process in bytes.
GetCurrentThreadId()

Gets the ID of the current thread.
returns The ID of the current thread.
GetCurrentTime()

Returns the current system time as a string.
returns The current system time in HH:mm:ss format.
GetCurrentUICulture()

Gets the current UI culture of the operating system.
returns The name of the current UI culture.
GetCurrentUser()

Gets the name of the current user.
returns The name of the current user.
GetDayOfWeek(date)

Gets the name of the day of the week for a given date.
date The date to get the day of the week for.
returns The name of the day of the week.
GetEnvironmentVariable(variable)

Gets the value of an environment variable.
variable The name of the environment variable.
returns The value of the environment variable.
GetExternalIpAddress()

Gets the external IP address of the machine.
returns The external IP address as a string.
GetInstalledFontNames()

Gets a list of installed font names on the system.
returns A comma-separated list of installed font names.
GetIpAddress()

Gets the local IP address of the machine.
returns The local IP address, or an empty string if no network connection is found.
GetLocalTime()

Gets the current local date and time.
returns The current local date and time in yyyy-MM-dd HH:mm:ss format.
GetLogicalDrives()

Gets a list of all logical drives on the system.
returns A comma-separated list of drive names.
GetLogicalProcessors()

Gets the number of logical processors on the current machine.
returns The number of logical processors.
GetMacAddress()

Gets the MAC address of the first operational network interface.
returns The MAC address as a string, or an empty string if no operational network interface is found.
GetMachineGuid()

Gets the machine GUID (Globally Unique Identifier).
returns The machine GUID as a string.
GetMachineName()

Gets the machine name of the current computer.
returns The machine name.
GetNetworkInterfaceNames()

Gets a list of network interface names on the system.
returns A comma-separated list of network interface names.
GetOsVersion()

Gets the version of the operating system.
returns The version of the operating system.
GetOSVersion()

Gets the operating system version of the current computer.
returns The operating system version.
GetProcessCount()

Gets the number of currently running processes on the system.
returns The number of running processes.
GetRandomGuid()

Generates a random GUID (Globally Unique Identifier).
returns A random GUID as a string.
GetRandomItem(items)

Gets a random item from an array of items.
items An array of items.
returns A random item from the array.
GetRunningProcesses()

Gets a list of running process names on the system.
returns A comma-separated list of running process names.
GetRunningServices()

Gets a list of running services on the machine.
returns A comma-separated list of running service names.
GetSystemDirectory()

Gets the path of the system directory.
returns The path of the system directory.
GetSystemDirectoryPath()

Gets the path of the system directory.
returns The path of the system directory.
GetSystemDrive()

Gets the system drive letter (e.g., "C").
returns The system drive letter.
GetSystemPageSize()

Gets the size of the system's memory page in bytes.
returns The size of the memory page in bytes.
GetSystemTimeZone()

Gets the current system time zone.
returns The name of the current time zone.
GetSystemUptime()

Gets the system uptime in seconds.
returns The system uptime in seconds.
GetTempPath()

Gets the path of the temporary folder.
returns The path of the temporary folder.
GetTickCount()

Gets the number of milliseconds elapsed since the system started.
returns The number of milliseconds since the system started.
GetUserDomainName()

Gets the domain name associated with the current user.
returns The domain name of the current user.
GetUserInteractive()

Checks if the current process is running in user-interactive mode.
returns True if the process is running in user-interactive mode, otherwise false.
GetUserName()

Gets the user name of the currently logged-in user.
returns The user name.
GetUserProfileDirectory()

Gets the path of the user profile directory.
returns The path of the user profile directory.
GetUtcNow()

Gets the current UTC date and time.
returns The current UTC date and time in yyyy-MM-dd HH:mm:ss format.
HexToRGB(hexColor)

Converts a hexadecimal color string to an RGB color.
hexColor The hexadecimal color string (e.g., "#RRGGBB").
returns An array containing the RGB values.
Init()

Init zs utilities for any exception in program.
IsArmstrong(number)

Checks if a given number is an Armstrong number (Narcissistic number).
number The number to check.
returns True if the number is an Armstrong number, otherwise false.
IsDebuggerAttached()

Checks if a debugger is attached to the process.
returns True if a debugger is attached, otherwise false.
IsEven(number)

Checks if a given number is even.
number The number to check.
returns True if the number is even, otherwise false.
IsFileExists(filePath)

Checks if a file exists at the specified path.
filePath The path of the file.
returns True if the file exists, otherwise false.
IsNumeric(text)

Checks if a given string represents a numeric value.
text The string to check.
returns True if the string is numeric, otherwise false.
IsOdd(number)

Checks if a given number is odd.
number The number to check.
returns True if the number is odd, otherwise false.
IsPalindrome(text)

Checks if a given string is a palindrome.
text The string to check.
returns True if the string is a palindrome, otherwise false.
IsPrime(number)

Checks if a given number is a prime number.
number The number to check.
returns True if the number is prime, otherwise false.
IsRunningAsAdmin()

Checks if the application is running with administrative privileges.
returns True if running as an administrator, otherwise false.
KillProcessByName(processName)

Kills a process by its name.
processName The name of the process to kill.
LevenshteinDistance(source,target)

Calculates the Levenshtein distance between two strings.
source The source string.
target The target string.
returns The Levenshtein distance between the two strings.
MergeArrays(array1,array2)

Merges two arrays into a single array.
array1 The first array.
array2 The second array.
returns The merged array.
OpenUrl(url)

Opens the specified URL in the default web browser.
url The URL to open.
PlayBeep()

Plays a simple beep sound.
RemoveDuplicates(array)

Removes duplicate values from an array.
array The array with possible duplicate values.
returns An array with duplicates removed.
RGBToHex(red,green,blue)

Converts RGB color values to a hex color code.
red The red component (0-255).
green The green component (0-255).
blue The blue component (0-255).
returns The hex color code as a string.
SendEmail(to,subject,body,smtpServer,smtpPort,username,password)

Sends an email using SMTP.
to The recipient email address.
subject The email subject.
body The email body.
smtpServer The SMTP server address.
smtpPort The SMTP server port.
username The SMTP server username.
password The SMTP server password.
SendLeftClick(x,y)

Sends a left mouse click at the specified screen coordinates.
x The x-coordinate of the screen position.
y The y-coordinate of the screen position.
SendRightClick(x,y)

Sends a right mouse click at the specified screen coordinates.
x The x-coordinate of the screen position.
y The y-coordinate of the screen position.
SetClipboardText(text)

Sets the specified text content to the clipboard.
text The text content to set to the clipboard.
SetCursorPosition(x,y)

Sets the cursor position to the specified screen coordinates.
x The x-coordinate of the screen position.
y The y-coordinate of the screen position.
SortDescending(array)

Sorts an array of numbers in descending order.
array The array to sort.
returns The sorted array in descending order.
StartProcessWithArguments(processName,arguments)

Starts a process with the specified arguments.
processName The name of the process to start.
arguments The arguments to pass to the process.
SumOfDigits(number)

Calculates the sum of the digits of a given number.
number The number whose digits are to be summed.
returns The sum of the digits.
ThrowException(message)

Throws an exception with the specified message.
message The message for the exception.
ToIso8601(dateTime)

Converts a DateTime object to ISO 8601 format (yyyy-MM-ddTHH:mm:ssZ).
dateTime The DateTime object to convert.
returns The ISO 8601 formatted date string.
ZSVar

Store varibles and acces even after exe close.
Delete
![]() |
Exists
![]() |
Get
![]() |
ListAll
![]() |
ResetFile
![]() |
Save
![]() |
SetFile
![]() |
Delete(name)

Deletes a variable from the .zsbin file.
name The variable name to delete.
Exists(name)

Checks whether a variable exists in the .zsbin file.
name The variable name to check.
returns True if the variable exists, otherwise false.
Get(name)

Gets the value of a stored variable from the .zsbin file.
name The variable name.
returns The stored value, or empty string if not found or error.
ListAll()

Lists all stored variable names in the .zsbin file.
returns An array of variable names.
ResetFile()

Resets to use the default .zsbin file based on the EXE name.
Save(name,value)

Saves a variable to the .zsbin file. Replaces if it already exists.
name The variable name.
value The variable value as a string.
SetFile(path)

Sets a custom binary variable file instead of the default (exename.zsbin).
path The full file path to use as the .zsbin store.
ZSWpf

Wpf And GW.
GetStyleFromXaml
![]() |
SetStyle
![]() |
SetWindowVisible
![]() |
Title
![]() |
GetStyleFromXaml(xamlFilePath,styleName)

Loads a style from a specified XAML file path and style name.
xamlFilePath The file path of the XAML file.
styleName The name of the style to retrieve.
returns The style if found, otherwise null.
SetStyle(shapeName,xaml,style)

Sets a style from a XAML file to a shape or control.
shapeName The control or shape name.
xaml The XAML file name.
style The style name.
SetWindowVisible(value)

Changes the value of the internal static field '_windowVisible' in the GraphicsWindow class.
value The value to set (true or false).
Title(Title)

Sets the Title for the Graphic Window.
Title The Title
ZSZip

The Class for Zip and UnZip of Files.
AddFile
![]() |
CloseZip
![]() |
CreateFromDir
![]() |
CreateZip
![]() |
ExtractZip
![]() |
ListFiles
![]() |
OpenZip
![]() |
AddFile(Name,FilePath)

Add a file to the ZIP archive.
Name The name of the ZIP archive to add the file to.
FilePath The file path of the file to add to the ZIP archive.
CloseZip(Name)

Close the ZIP archive and save it.
Name The name of the ZIP archive to close.
CreateFromDir(SourceDir,ZipName,Level,Includebase)

Make A Zip file from a directory whole content will be added.
SourceDir The Directory Path.
ZipName The Zip Name to be created.
Level Compression Level :
0 = Fastest.
1 = No Compression.
2 = Optimal.
Includebase True or False will you want they folder itself then its content into zip or the content of folder directly.
CreateZip(Name,Path)

Create a new ZIP archive.
Name The identifier name for the ZIP archive.
Path The path where the ZIP archive will be saved.
returns The name of the ZIP archive created.
ExtractZip(ZipPath,ExtractPath)

Extract a ZIP archive to a specified directory.
ZipPath The path to the ZIP file to extract.
ExtractPath The directory where files should be extracted.
ListFiles(Name)

List all files currently added to a ZIP archive.
Name The name of the ZIP archive.
returns A string containing all file names in the ZIP archive.
OpenZip(Name,Path)

Open a ZIP archive.
Name The identifier name for the ZIP archive.
Path The path where the ZIP archive is.
returns The name of the ZIP archive.