#include <GScriptingPriv.h>
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 | System (GVariant *Ret, ArgumentArray &Args) |
bool | GetInputDlg (GVariant *Ret, ArgumentArray &Args) |
bool SystemFunctions::Strchr | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
int Strchr(string, char[, string_length][, reverse]);
References GArray< Type >::Length().
bool SystemFunctions::Strstr | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
int Strstr(string1, string2, case_insensitive, string_length);
References GArray< Type >::Length().
bool SystemFunctions::Strcmp | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
int Strcmp(string1, string2, case_insensitive, string_length);
References GArray< Type >::Length().
bool SystemFunctions::Substr | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
String Substr(string, start[, length]);
References GVariant::Empty(), GV_STRING, GArray< Type >::Length(), LgiUtf8To32(), GVariant::String, GVariant::Type, 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 | |||
) |
Opens a file open dialog to select files.
Args: GView *Parent, char *Patterns, char *InitFolder, bool Multiselect
References GFileSelect::InitialDir(), List< Type >::Insert(), GFileSelect::Length(), GArray< Type >::Length(), LGI_ALL_FILES, GVariant::Lst, GFileSelect::MultiSelect(), GFileSelect::Open(), GFileSelect::Parent(), GVariant::SetList(), GFileSelect::Type(), and GVariant::Value.
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::Execute | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
Executes a command, waits for it to finish, then returns it's output: String Execute(String Application, String CmdLine);
References GArray< Type >::Length(), GStringPipe::NewStr(), and GProcess::Run().
bool SystemFunctions::System | ( | GVariant * | Ret, | |
ArgumentArray & | Args | |||
) |
Executes a command and doesn't wait for it to return: Bool System(String Application, String CmdLine);
References GArray< Type >::Length().
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.