SystemFunctions Class Reference

Scripting engine system functions. More...

#include <GScriptingPriv.h>

Inheritance diagram for SystemFunctions:


List of all members.

Public Member Functions

bool Strchr (GVariant *Ret, ArgumentArray &Args)
bool Strstr (GVariant *Ret, ArgumentArray &Args)
bool Strcmp (GVariant *Ret, ArgumentArray &Args)
bool Substr (GVariant *Ret, ArgumentArray &Args)
bool LoadString (GVariant *Ret, ArgumentArray &Args)
bool Sprintf (GVariant *Ret, ArgumentArray &Args)
 Formats a string.
bool FormatSize (GVariant *Ret, ArgumentArray &Args)
 Formats a file size.
bool Tokenize (GVariant *Ret, ArgumentArray &Args)
 Break a string into tokens.
bool NewHashTable (GVariant *Ret, ArgumentArray &Args)
 Creates an empty hash table.
bool NewList (GVariant *Ret, ArgumentArray &Args)
 Creates an empty list variable.
bool DeleteElement (GVariant *Ret, ArgumentArray &Args)
 Deletes an element out of an array or hash table.
bool ReadTextFile (GVariant *Ret, ArgumentArray &Args)
 Reads a text file into a variable.
bool WriteTextFile (GVariant *Ret, ArgumentArray &Args)
 Writes a text file from a variable.
bool SelectFiles (GVariant *Ret, ArgumentArray &Args)
 Opens a file open dialog to select files.
bool ListFiles (GVariant *Ret, ArgumentArray &Args)
bool DeleteFile (GVariant *Ret, ArgumentArray &Args)
 Deletes a file.
bool Sleep (GVariant *Ret, ArgumentArray &Args)
 Sleeps a number of milliseconds.
bool ClockTick (GVariant *Ret, ArgumentArray &Args)
 Get the current tick count.
bool Now (GVariant *Ret, ArgumentArray &Args)
 Get the date time.
bool Execute (GVariant *Ret, ArgumentArray &Args)
bool GetInputDlg (GVariant *Ret, ArgumentArray &Args)

Detailed Description

Scripting engine system functions.

Member Function Documentation

bool SystemFunctions::Execute ( GVariant Ret,
ArgumentArray Args 

Executes a command and returns it's output: String Execute(String Application, String CmdLine);

References GArray< Type >::Length(), GStringPipe::NewStr(), and GProcess::Run().

bool SystemFunctions::GetInputDlg ( GVariant Ret,
ArgumentArray Args 

Gets an input string from the user String GetInputDlg(Window Parent, String InitialValue, String Question, String Title[, bool IsPassword]);

References GDialog::DoModal(), GArray< Type >::Length(), and GInput::Str.

bool SystemFunctions::ListFiles ( GVariant Ret,
ArgumentArray Args 

Lists file in folder

Args; char *Path, [optional] char *Pattern Returns: List of DOM objects with the following fields: Name - File/dir name Size - Size of entry Folder - bool, true if folder Modified - GDateTime, modified time

References GVariant::Empty(), GDirectory::First(), GDirectory::GetName(), List< Type >::Insert(), GArray< Type >::Length(), GVariant::Lst, GDirectory::Next(), GVariant::SetList(), and GVariant::Value.

bool SystemFunctions::LoadString ( GVariant Ret,
ArgumentArray Args 

Loads a string from the resource file (.lr8) i.e. LoadString(1102) where 1102 is the id of the string in the applications .lr8 file Basically a wrapper around LgiLoadString

References GArray< Type >::Length().

bool SystemFunctions::SelectFiles ( GVariant Ret,
ArgumentArray Args 

bool SystemFunctions::Strchr ( GVariant Ret,
ArgumentArray Args 

int Strchr(string, char[, string_length][, reverse]);

the position of 'char' in 'string' or -1 if 'string' doesn't contain 'char'. You may optionally supply a max number of chars to search.

References GArray< Type >::Length().

bool SystemFunctions::Strcmp ( GVariant Ret,
ArgumentArray Args 

int Strcmp(string1, string2, case_insensitive, string_length);

a comparision of 'string1' and 'string2'. You can optionally make it case insensitive by seting the 'case_insensitive' flag.

References GArray< Type >::Length().

bool SystemFunctions::Strstr ( GVariant Ret,
ArgumentArray Args 

int Strstr(string1, string2, case_insensitive, string_length);

the position of 'string2' in 'string1' or -1 if 'string1' doesn't contain 'string2'. You may optionally supply a max number of chars to search.

References GArray< Type >::Length().

bool SystemFunctions::Substr ( GVariant Ret,
ArgumentArray Args 

String Substr(string, start[, length]);

a sub-segment of 'string'.

References GVariant::Empty(), GV_STRING, GArray< Type >::Length(), LgiUtf8To32(), GVariant::String, GVariant::Type, and GVariant::Value.

The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:05 2010 for Lgi by  doxygen