Module Reference
gkScript main object
class gkScript
{
string executionType(); // returns "exe", "service" or "docker"
// Helper functions
time_t time();
time_t utcOffset();
string timeString(time_t val, bool convertToLocalTime = true);
int tick(); // tick-count in milliseconds
string expandString(string);
string getKnownFolder(string);
sleep(milliseconds);
string getCommandLine();
vector<string> getArgList();
string getNetworkId(bool appendGateway);
int getConnectionCost(string host);
string getUserSID();
string getUserUPN();
string getMailAddress();
bool waitForNetwork(milliseconds);
map<string, string> getUrlParameter(string url);
string urlEncode(string);
string pathEncode(string); // same as urlEncode, but does not encode '/'
string hexEncode(string);
string base64Encode(string);
string base64Decode(string);
string toLower(string);
string utf16ToUtf8(string);
string utf8ToUtf16(string);
string jScriptStringEncode(string);
bool matchWildCard(string pattern, string test);
int getCodePage();
string randomFill(size);
bool cryptProtect(string in, bool toLocalMachine, string &out);
bool cryptUnprotect(string in, string &out);
bool exportCertStore(string path, string password);
// Settings store
bool setString(Key, Value);
string getString(Key);
bool setInt(Key, Value);
integer getInt(Key);
// Logging functions
LogLevel getLogLevel();
setLogLevel(level);
logError(string);
logInfo(string);
logDebug(string);
bool exportLog(string);
setPowermode(bool on); // on: prevent idle power off
// WMI
map<string Name, Value> wmiQuery(string Path, string Query);
// Processes and Threads
bool shellExecute(hwnd, string verb, string path);
int executeProcess(string commandLine, string stdin, string &stdout, string &stderr, unsigned int timeout);
handle runProcess(string commandLine);
handle openProcess(int processId);
bool wait(handle, milliseconds); // can wait for processes, threads, events
bool terminateProcess(handle, int exitCode);
wmQuitProcess(int processId); // send WM_QUIT to all windows of that process
int getExitCode(handle);
handle runThread(string chaiCommand);
bool terminateThread(handle, int exitCode);
// Events
handle createEvent();
setEvent(handle);
resetEvent(handle);
// script tool
ScriptTool ScriptTool(bool with_gkScript);
};Helper functions
urlEncode - getUrlParameter
matchWildCard
Script
Function
Network helper functions
Script
Function
Script
Function
Logging
Tray Icon
WMI
Script
Function
Script Tool
Script
Function
Last updated
Was this helpful?