Aezay Script Library:

  Last Revised: Monday, May 16, 2005.

  This document will try to cover the basics of my script language.
  The script language was developed for an application named NiftyWorker, which is still in the beta stage.

  Currently there exist two versions of this script library:
  ===========================================================
  sc_Aezay.dll      build 263   Standard Version   Unreleased
  sc_TotalCmd.dll   build 289   TotalCmd Version   Released


Sign Description:

  *     Implemention unfinished or unsatisfactory. Function will properly be removed or changed in future versons.
  -     Only included in the standard version of the script library.

  int   Integer
  str   Sting
  var   Must be a variable set with #define


List of Changes:

  TotalCmd Version - build 289:
  - Fixed the command "SendText" to work properly.

  TotalCmd Version - build 286:
  - Recompiled.

  TotalCmd Version - build 283:
  - Removed if & ifn. Added IfInt & IfNotInt instead
  - Removed Mouse. Added SetCursorPos, MoveCursor & MouseClick instead
  - Added FileExist


List of Currently Implemented Functions:

*IfInt(ValueA, ValueB: int);
  Executes the next line in the script, if the two parameters are equal

*IfNotInt(ValueA, ValueB: int);
  Executes the next line in the script, if the two parameters aren't equal

StrCopy(var Dest: str; Source: str);
  Copies the source string into the Dest variable

StrCat(var Dest: str; Source: str);
  Appends the source string to the Dest variable

StrLen(var S: str):int;
  Returns the length of the string

IntSet(var I: int; Value: int);
  Sets the value of the integer variable

IntToStr(var S: str; Value: int);
  Converts the integer Value into a string

IntShow(Value: int);
  Shows the value of the integer in a standard messagebox, mostly for debugging purpose

Rnd(Range: int):int;
  Returns a random number in the range 0..Range-1

TickCount:int;
  Returns the number of milliseconds windows has been opened for

Exec(Filename: str; Params: str; InitDir: str):int;
  Executes a file

FileExist(Filename: str):int;
  Returns nonzero if the file exist, otherwise zero

Input(Prompt: str):int;
  Query the user for a string. The value entered is saved in the variable InputRes. The caption can be changed with the InputCaption variable. Returns 1 on OK and 0 on Cancel.

QueryItem(Prompt: str; Items: str):int;
  The Items paramter should have this format "Item1\0Items2\0Item3\0\0". Returns the index of the item choosen, -1 if user pressed Cancel.

PostMsg(ClassName: str; Msg, wParam, lParam: int):int;
  Posts a message to another Window. Returns 1 if successful, otherwise 0.

SendMsg(ClassName: str; Msg, wParam, lParam: int):int;
  Sends a message to another Window. Will no return until the other window has finished. The return value depends on the message sent.

SysMetrics(Index: str):int;
  Same as Windows API GetSystemMetrics

DrawText(Left, Top: int; Font: str; Size, Color: int; Text: str);
  Draws a message directy on the screen.

DrawTextCls;
  Clears the sceen for any text drawn.

GetKeyState(VKey: int):int;
  Returns 1 if the VKey is pressed, otherwise 0.

SetKeyState(VKey, State: int);
  Set the state of a key.

*WndClass(Cmd: text; ClassName: str);
  n/a

Sleep(mSec: int);
  Pauses the script execution for the specifed number of milliseconds

SetCursorPos(X, Y: int);
  Will set the mouse cursor coordinates

MoveCursor(X, Y: int);
  Will move the mouse cursor coordinates relative to the current position

*MouseClick(State: int);
  Emulates mouse clicks. 0 = leftclick; 1 = rightclick; 2 = doubleclick;

GetClipbrd(var S: str);
  Copies the content of the clipboard into the string variable.

SetClipbrd(Text: str);
  Set the contents of the clipboard

DelClipBrd;
  Clear the clipboard

SendVKey(VKey: int; State: int);
  Emulates a key press. Value of State: 0: The key is released; 1: the Key is pressed down; 2: The Key is pressed down and released.

SendText(Text: str);
  Emulates text written

*PcSpk(Cmd: text);
  Play frequency on the PC Speaker

PlaySnd(FileName: str);
  Plays a wave file.

MsgBox(Prompt, Caption: str; Flags: int):int;
  Shows a messagebox. Return value is equal to the standard Windows API MessageBox function.

Break;
  Terminates the execution of the script

HostCmd(Cmd: int);
  Sends a specific command to the host application. The Cmd parameter depends on each Host.

-HostIcon(Index: int);
  n/a

-RunPreset(Name: str);
  n/a