Welcome to the home of the kiwi!

k.i.w.i.

overview    features    compatibility    roadmap    downloads    documentation    support

Introduction

kiwi/Script Language is a versatile & extensible Object Orientated Scripting Language that provides the Messaging Server with a Common Script Language. This provides the Programmer/System Administrator with a simple and consistent Interface to the Messaging Objects and Services available. Like all [Object Orientated] Programming Languages it comprises of a Core set of Object types, Expression Operators, Control Structures, and Statements. This can also be extended by supplementing it with new Object types & Statements at runtime.

For example, the kiwi/Web Server extends the core Script Language by providing you with a new Object type called '_Session'. This Object type is specific to serving Web Pages; and as such it carries no meaning in the Mail Server. It is therefore unavailable when a script is called from that process. Currently the kiwi/Script Language comprises of a Core set of Objects & Statements that are available System wide, and is then further extended with two Extensions that are only made available by the invoking Server processes.

These are listed below:


Expression Operators

Assignment Operators

Operator        Meaning
=               Variable Assignment
+=              Add RHS to variable
-=              Subtract RHS from variable
%=              Modulus variable by RHS
*=              Multiply variable by RHS
/=              Divide variable by RHS
|=              Binary 'OR' RHS to variable
&=              Binary 'AND' RHS to variable 
^=              Binary 'XOR' RHS to variable
<<=             Binary Shift contents of variable 
                  to the left by RHS times
>>=             Binary Shift contents of variable 
                  to the right by RHS times

Comparison Operators

Operator        Meaning
==              Equals 
>               Greater Than 
<               Less Than
>=              Greater Than or Equal to
<=              Less Than or Equal to

Binary Operators

Operator        Meaning
|               OR
&               AND
^               XOR
>>              Shift contents of variable 
                  to the left  
<<              Shift contents of variable 
                  to the right  
!               NOT

Postfix & Prefix Operators

Operator        Meaning
++              Increment variable
--              Decrement variable

Logic Operators

Operator        Meaning
||              OR
&&              AND 
?:              Conditional ie. x==true ? yes : no

Arithmetic Operators

Operator        Meaning
+               Add
-               Subtract
/               Divide
*               Multiply
%               Modulus

Statements

kiwi/Script includes a comprehensive list of statements and functions that you may use to:

  • Automate any number of administrative tasks
  • Create your own rich & dynamic Web/Message based server applications.
  • Programmatically manage Account Message Stores.
  • Programmatically create & send electronic messages (E-Mail).
  • Integrate with 3rd party applications.

Comments

Rem
//
/* .. */

Conditional

End | Exit
Goto
If .. Else .. EndIf
IsDef
Switch .. EndSwitch

Loops

Continue
Do .. Loop
For .. EndFor
While .. EndWhile

Directory Handling

CopyFile
DeleteFile
GetFileAttr
GetFileSize
MkDir
MoveFile
RenameFile
RmDir
SetFileAttr

Scripts

GetErrorString
GetLastError
GetTickCount
Eval
Include
ScriptAccount
ScriptDomain
ScriptName
ScriptPath
ScriptRunTime
WebSiteAccount
WebSiteDomain

Functions

Function
Return

Variables

CBool
CFloat
CInt
Const
CStr
Delete
GetDate
Global
New
NKBToStr
Min / Max
SizeOf
TypeOf
UTCToStr
Var
VarType

Output (Display/Stream)

Echo / EchoH
Print
Printf
DebugPrintf

Objects

Date
DirEnt
File
Float
Int
LSM
LsmRS
Socket
String
ULong
Mailbox
Message
MessageStore
MsgBody
MsgSet
MySQLDB
MySQLRS
MySQLRow
WebServer
All content herein
Copyright (c) 2007-now Darren Alford.