Contents 

Overview
Fundamentals
Variable declaration
Variable assignment
Adding variables
Setting variables
Include function
Evaluate function
Constants
Arrays
If...then...else Statement
For Statement
Foreach Statement
While Statement
Function definition
Operators
Comments
Performance Profiler
Functions
String processing
Overview
Length
Left
Right
Mid
Trim
TrimLeft
TrimRight
ToUpper
ToLower
Find
FindOneOf
ReverseFind
WildcardCompare
Tokenize
RegularExpressionMatch
RegularExpressionParse
Operator [ ]
Delete
Remove
Replace
MakeReverse
SpanIncluding
SpanExcluding
ToUTF8
FromUTF8
File IO routines
Overview
ReadData
ReadDataToString
WriteData
ReadString
WriteString
AppendString
GetLastFileError
EOF
CloseFile
CreateDir
RemoveDir
ChangeDir
GetCurrentDir
IsFileExist
FileSize
CopyFile
MoveFile
RemoveFile
Seek
SeekToBegin
SeekToEnd
SetFileEncoding
SetUseUnicodeBOM
ListFiles
CountFilesInFolder
MapNetworkDrive
DisconnectNetworkDrive
EnumerateDrives
GetDriveInfo
Time routines
Overview
Sleep
MilliSleep
GetTime
GetTimeString
FormatTime
ConvertToUnixTime
GetTickCount
SNMP management
Overview
SnmpGet
SnmpGetNext
SnmpGetBulk
SnmpSet
GetPduErrorStatus
GetPduErrorString
GetPduErrorIndex
GetVarCount
GetVarAt
CreatePdu
AppendVar
GetVarOID
GetVarResolvedName
GetVarValue
GetVarResolvedValue
GetVarResolvedDescription
GetVarSyntax
CreateVar
GetPduIp
GetPduEnterprise
GetPduTrapCode
GetPduTrapName
GetPduResolvedTrapName
GetPduResolvedTrapDescription
GetPduCommunity
GetPduVersion
SendTrap
ForwardTrap
PrepareTrapPdu
SetMaxPduSize
SNMP MIB functions
Overview
LoadMIB
ResolveOID
GetOidByName
ResolveTrap
UnloadMIB
QuickMibLookup
Cryptography
Overview
Encrypt
Decrypt
CalculateMD5Hash
CalculateSHA1Hash
HMAC
BuildKeyFromPassword
Base64Encode
Base64Decode
CRC16
CRC32
HexStringToByteArray
ByteArrayToHexString
Skype integration functions
Overview
SkypeGetContacts
SkypeSendChatMessage
SkypeSendSMS
SkypeCallAndSpeakText
XML processing
Overview
ReadXml
WriteXml
GetXmlTag
CreateXml
InsertAttr
IsXmlValid
SelectXmlNodes
XslTransform
GetAttrString
GetAttrInt
GetAttrDouble
GetXmlBody
GetXmlAttributes
SetXmlBody
AddChild
GetChildrenCount
GetChildAt
JSON processing
Overview
ParseJSON
ToJSON
FTP functions
Overview
FtpOpen
FtpClose
FtpGetCurrentDir
FtpSetCurrentDir
FtpCreateDir
FtpRemoveDir
FtpGet
FtpPut
FtpRemoveFile
FtpRenameFile
FtpListFiles
FtpCountFilesInFolder
TFTP functions
Overview
TFTPGet
TFTPPut
Networking functions
Overview
HttpPing
HttpGet
HttpPost
OpenTCPConnection
OpenUDPSocket
SendTCPData
SendUDPData
IsDataAvailable
ReadTCPData
ReadUDPData
CloseSocket
TCPListen
TCPAcceptConnection
GetHostByAddress
GetAddressByName
DnsQuery
SendMail
SendMailEx
SendHtmlMail
TestSMTPConnection
GetHostName
GetHostDnsSuffix
GetSocketName
SetSocketOption
TestPOP3Connection
POP3GetStats
POP3 Mail Client Example
Ping
TraceRoute
GetMacAddress
EnumerateSharedResources
Working with serial ports and USB HID devices
Overview
OpenSerialPort
CloseSerialPort
IsSerialDataAvailable
ReadSerialData
WriteSerialData
WriteSerialControlChar
SetSerialFlowControl
ClearSerialDTR
ClearSerialRTS
SetSerialDTR
SetSerialRTS
SetSerialXOFF
SetSerialXON
SetSerialBreak
ClearSerialBreak
GetSerialModemStatus
USBOpen
USBClose
USBWriteFeatureReport
USBReadFeatureReport
USBWriteData
USBReadData
USBEnumerateDevices
USBGetFeatureReportLength
Working with Ginkgo USB-I2C adapter
Overview
USBAdapterOpen
USBAdapterClose
USBAdapterBoardInfo
USBAdapterSetPins
USBAdapterResetPins
USBAdapterSetInput
USBAdapterSetOutput
USBAdapterSetOpenDrain
USBAdapterReadGPIO
USBAdapterGetErrorString
USBAdapterSetReadBufferSize
USBAdapterInitI2C
USBAdapterInitTimeConfig
USBAdapterInitADC
USBAdapterInitPWM
USBAdapterInitCNT
USBAdapterInitUART
USBAdapterReadI2C
USBAdapterReadSlaveI2C
USBAdapterReadADC
USBAdapterReadUART
USBAdapterWriteI2C
USBAdapterWriteSlaveI2C
USBAdapterWriteUART
USBAdapterSetPWMPulse
USBAdapterSetPWMPeriod
USBAdapterStartPWM
USBAdapterStopPWM
USBAdapterSetCounter
USBAdapterStartCounter
USBAdapterGetCounter
USBAdapterStopCounter
Working with GSM modems
Overview
SendSMS
RetrieveAllSMSMessages
RetrieveUnreadSMSMessages
DeleteSMSMessage
DeleteAllSMSMessages
Working with zip archives
Overview
ZipFiles
UnzipFiles
AddFileToZip
AddFolderToZip
RemoveFileFromZip
ListFilesInZip
UnzipFile
Mathematical routines
Overview
abs
acos
asin
atan
CalculateScaleFactor
cos
cosh
exp
IsNAN
log
log10
max
mod
pow
ScaleArray
sin
sinh
sqrt
tan
tanh
Charts
Overview
CreateGauge
CreatePieChart
CreateBarChart
CreateLineChart
CreateXYLineChart
Database Interface
Overview
DBOpen
DBClose
DBExecuteSQL
DBSelect
DBInsertSelect
DBGetSQLStatus
DBGetSQLErrorString
CompactAccessDB
GetDataSources
CreateDataSource
RemoveDataSource
DBSetLoginTimeout
DBSetQueryTimeout
Using in-memory cache
Overview
AddCacheEntry
RemoveCacheEntry
RemoveAllCacheEntries
GetCacheEntriesCount
CacheLookup
FindEntryInCache
CacheLoad
CacheSave
CacheToString
Round Robin Databases
Overview
RrdCreate
RrdUpdate
RrdRemove
RrdFetch
RrdGetCurrentValue
Event Log functions
Overview
EventLogGetNumberOfRecords
EventLogGetOldestRecord
EventLogReadRecord
EventLogWaitForEvent
EventLogWriteRecord
Service Control Manager
Overview
SCMEnumerateServices
SCMGetServiceInfo
SCMStartService
SCMStopService
Parameter Files
Overview
GetParameterCount
GetParameterName
GetParameterType
GetParameterValue
GetParameterDisplayName
GetParameterDescription
GetParameterEnumValues
GetParameterEnumValue
GetEnumValueNameFromInt
Process management functions
Overview
ExecuteCommand
RunCommand
FindProcess
GetProcesses
RedirectOpen
RedirectClose
RedirectGetStdOut
RedirectGetStdError
RedirectSendInput
GetProcessorUsage
GetMemoryUsage
WMI functions
Overview
WMIOpen
WMIClose
WMIQuery
WMIGetErrorStatus
Short Message Peer-to-Peer (SMPP)
Overview
SmppOpen
SmppClose
SmppSubmitMessage
SmppEnquireLink
SmppGetLastError
Query functions
Overview
LDAPQuery
REGQuery
CSVQuery
TSVQuery
EventLogQuery
TextLineQuery
TextWordQuery
FSQuery
GetQueryStatus
GetQueryErrorString
Microsoft Outlook integration
Overview
OpenOutlookSession
CloseOutlookSession
OutlookSendMail
OutlookSendMeetingRequest
OutlookCreateTask
Ports IO
Overview
ReadPort
WritePort
IBM WebSphere Message Queue (MQ) functions
Overview
WMQConnect
WMQDisconnect
WMQOpenQueue
WMQCloseQueue
WMQPutMessage
WMQGetMessages
WMQGetManagerStatus
WMQGetQueueStatus
WMQSetOptions
Other routines
Overview
Println
MessageBox
ToString
ToInteger
ToDouble
ToChar
ToByte
ToXml
LogMessage
GetLastSystemError
GetSystemErrorString
GetEnvironmentStrings
GetEnv
SetEnv
IsVariableExist
IsArrayElementExist
GetArraySize
GetArrayIndex
PreallocateArrayHashTable
Sort
IsBitSet
SetBit
ClearBit
ToggleBit
Beep
GetNetDecisionSystemDir
PlaySound
TextToSpeech
Rand
SeedRand
GenerateUID
RGB
Logon
Reboot

NetDecision Script Language Reference

Prev Page Next Page

Networking functions

Networking functions allow the user to communicate with remote host via different network protocols. Also this API implements SMTP and POP3 protocols.

General TCP/IP related functions

Function Description
GetAddressByName Retrieves host IP address corresponding to a host name from a host database.
GetHostName Returns local host name.
GetHostDnsSuffix Returns the name of the DNS domain assigned to the local computer. If the local computer is a node in a cluster, the DNS domain name of the cluster virtual server.
GetSocketName Returns the local name for a socket (IP address and port).
GetHostByAddress Returns host name resolved by Domain Name System (DNS) by IP address.
DnsQuery Provides the generic query interface to the DNS namespace.

HTTP functions (GET, POST)

Function Description
HttpPing "Pings" a Web site that is known to be up to check whether a valid Internet Connection can be made.
HttpGet Retrieves the content of the Web page.
HttpPost Sends HTTP POST request to the Web server.

 SMTP and POP3 functions

Function Description
SendMail Sends email.
SendMailEx Sends email with attachment.
SendHtmlMail Sends email in HTML format.
TestSMTPConnection Call this function to test a SMTP mail server's ability to accept incoming sessions, as well as its level of responsiveness.
TestPOP3Connection This function opens a connection to the specified POP3 server and waits for the Server to respond with a standard "Service Ready for a new user" (code 220) message.
POP3GetStats Retrieves the statistics for the Mailbox by issuing the POP3 "STAT" command.

ICMP functions

Function Description
Ping Performs an ICMP ping.
TraceRoute Performs an ICMP trace route.

ARP functions

Function Description
GetMacAddess Sends an Address Resolution Protocol (ARP) request to obtain the physical address that corresponds to the specified destination IPv4 address.

Shared network resources (Microsoft networking)

Function Description
EnumerateSharedResources Enumerates shared network resources.

Working with connected stream (TCP) and datagram (UDP) sockets

Sockets is a method for communication between a client program and a server program in a network. A socket is defined as "the endpoint in a connection." Sockets can also be used for communication between processes within the same computer. 

  • Stream sockets provide for a data flow without record boundaries: a stream of bytes that can be bidirectional (the application is full duplex: it can both transmit and receive through the socket). Streams can be relied upon to deliver sequenced, unduplicated data. ("Sequenced" means that packets are delivered in the order sent. "Unduplicated" means that you get a particular packet only once.) Receipt of stream messages is guaranteed, and streams are well suited to handling large amounts of data. 
    Stream sockets are preferable to datagram sockets when the data must be guaranteed to arrive and when data size is large.
  • Datagram sockets support a bidirectional data flow that is not guaranteed to be sequenced or unduplicated. Datagram's also are not guaranteed to be reliable; they can fail to arrive. Datagram data may arrive out of order and possibly duplicated, but record boundaries in the data are preserved, as long as the records are smaller than the receiver's internal size limit. You are responsible for managing sequencing and reliability. Datagram's are "connectionless", that is, no explicit connection is established; you send a datagram message to a specified socket and you can receive messages from a specified socket.
    An example of a datagram socket is an application that keeps system clocks on the network synchronized. This illustrates an additional capability of datagram sockets in at least some settings: broadcasting messages to a large number of network addresses.
    Datagram sockets are better than stream sockets for record-oriented data.
Function Description
OpenTCPConnection Establishes a stream TCP connection with destination host specified by IP address and port.
OpenUDPSocket Opens a datagram (UDP) socket on specific port.
SendTCPData Sends a TCP packet containing the given data via established TCP connection.
SendUDPData Sends a datagram (UDP) packet containing the given data to the specified host/port.
IsDataAvailable Determines if any data can be read from specified socket.
ReadTCPData Reads incoming data from connected stream (TCP) socket.
ReadUDPData Reads incoming data on a datagram socket and capture the address and port from which the data was sent.
CloseSocket Releases the socket descriptor.accept a connection on a socket.
TCPListen Creates TCP server socket and starts listening for incoming connection requests.
TCPAcceptConnection Accepts client connection on a TCP server socket.
SetSocketOption Sets a socket option.

 

 

   
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)