DNM Script : raw list of function declarations
Introduction
They are mostly self-descriptive and/or are exact equivalent the the Win API/MFC
functions (which are described on
MSDN). The list has the following syntax:
(return value) FunctionName (ArgumentType ArgumentName);
Example:
int strlen (string Str) ;
This function returns length of string - returns integer (numerical value)
and takes one argument: Str of type string. Usage:
var $sSomeString="Hello World!";
var $nLen=strlen($sSomeString);
MessageBox($nLen);//12
The list
//basics
int GetLastError();
var GetLastAdditionalResult();
int MessageBox(string sMessage, [string Caption],[int Type=MB_OK]);
string InputBox (string strQuestion); //IDOK/IDANCED in GetLastAdditionalResult
void Sleep (numerical Milliseconds);
//conversions
string str (any_var); //converts to string
integer int (any_var); //converts to integer
double double (any_var); //converts to double
string chr (numerical var); //converts ascii code to a char, eg. chr(65) returns
A.
int asc (string var); //Returns the ANSI character code corresponding to the first letter in a string
//vars
empty var var_getempty (); //for comparsison purposes
bool var_isempty(any_var);
string var_type(any_var);
bool var_exists ("$some_var");//-use "" !
string engine_internal_info ();
//arrays
numerical array_size (some_array_var);
string array_info (some_array_var);
//numerical
double sqrt (numerical);
double abs (numerical);
double (numerical);
void srand();
int rand();
//strings
int strlen (string Str) ;
int strcmp (string Str1,string Str2,[bool IgnoringCase=FALSE]);
int strfind (string str,strToFind,startFrom,[ bool IgnoringCase=FALSE]);
String strsub (string str,int nFrom,[int nTo=nFrom+1]) ;
String strdel (string str,int nFrom,[int nTo=nFrom+1]) ;
String strins (string str,int nAt,strWhat);
String strreplace (string str,int nFrom,int nTo,strWithWhat);
String strupper (string str);
String strlower (string str);
//Date,time
int TimeGetCurrent();
string TimeFormat(int nTime,[string format="%Y-%m-%d %H:%M:%S"]);//nTime : a
value returned by e.g. time_get_current
int TimeGetYear(int nTime);//nTime : a value returned by e.g. time_get_current
int TimeGetMonth(int nTime);//nTime : a value returned by e.g. time_get_current
int TimeGetDay(int nTime);//nTime : a value returned by e.g. time_get_current
int TimeGetDayOfWeek(int nTime);//nTime : a value returned by e.g.
time_get_current
int TimeGetHour(int nTime);//nTime : a value returned by e.g. time_get_current
int TimeGetMinute(int nTime);//nTime : a value returned by e.g. time_get_current
int TimeGetSecond(int nTime);//nTime : a value returned by e.g. time_get_current
//files,folders
bool ShellExecute (string strOperation,string strPath,[string strParams],[string
strDir]);// identical to Win Api's function ShellExecute
string GetCurrentDirectory ();
bool SetCurrentDirectory (string strPath);
bool FileDelete (string strPath);
bool FileRename (string pathSrc,string pathDest);
bool FileIsFolder (string strPath);
(array of strings) ReadDirectory (string strPath);
string UrlGetName (string strPath);
string UrlGetTitle (string strPath);
string UrlGetExt (string strPath);
string UrlGetParent (string strPath);
bool UrlIsSame (string strPath1,string strPath2);
string UrlJoin (string strPath1,string strPath2);
//windows
int SendMessage(hWnd hWnd,int Msg,[int wParam],[int lParam]);
HWND GetForegroundWindow();
bool SetForegroundWindow();
HWND FindWindow (string classname (or ""),string sWindowText (or ""));//top
level windows only