Image Uploader Scripting API
|
The Process class is used to start external programs and to communicate with them.
More...
Public Member Functions | |
Process () | |
Process (string executable) | |
Process (string executable, bool findInPath) | |
string | findExecutableInPath (string executable) |
bool | launchInShell (string command) |
Launches a shell-based command. More... | |
string | readOutput () |
void | setArguments (array arguments) |
void | setCaptureOutput (bool read) |
void | setExecutable (string program) |
void | setHidden (bool hidden) |
void | setOutputEncoding (string encoding) |
bool | start () |
int | waitForExit () |
The Process class is used to start external programs and to communicate with them.
Process | ( | ) |
Default empty constructor
Process | ( | string | executable | ) |
Constructor which takes executable name (should be absolute or relative path)
Process | ( | string | executable, |
bool | findInPath | ||
) |
findInPath | if true, executable is being searched in directories listed in PATH environment variable |
bool launchInShell | ( | string | command | ) |
Launches a shell-based command.
Executes the given command through the default system shell. The command is subject to pattern expansion, redirection and pipelining.
This function behaves similarly to the system(3) system call. In a POSIX system, the command is fed to /bin/sh whereas under a Windows system, it is fed to cmd.exe. It is difficult to write portable commands as the first parameter, but this function comes in handy in multiple situations.
void setHidden | ( | bool | hidden | ) |
If set to true, process window is hidden (Windows only)
void setOutputEncoding | ( | string | encoding | ) |
Set the encoding of process output stream. By default, CP_OEMCP is used on Windows and current locale on other systems. (UTF-8 on most of modern UNIX-bases systems)
int waitForExit | ( | ) |
Wait indefinitely for the associated process to exit.