KioUtils Object

Functions

Type Signature
int Execute(string cmdLine, bool asSystemUser = undefined)
Executes the specified command line and returns the process id of the new process.
int ExecutePath(string path, string args, bool asSystemUser = undefined)
Shell executes the specified path with args, and returns the process id of the new process.
void LogPageStats (string, string)
Manually logs a new page navigation entry into the KioWare usage statistics log.
bool SendKey(int key, uint modifiers = 0, uint target = 0)
Sends a keyboard key value to target.
bool SendKeyString(string msg, uint target = 0)
Attempts to convert each character in msg to keys, calling SendKey for each one.
bool SetClipboard(string text)
Sets the Windows clipboard with text.
bool Paste(uint target)
Sends Ctrl+V to paste the current clipboard contents to target.
double GetMasterVolume()
Gets the current master sound volume level.
void SetMasterVolume(double volPercent)
Sets the master volume level to volPercent.
string NewGuid()
Gets a GUID.
bool CapsLockEnabled(bool enable = undefined)
Gets or sets caps lock key state.
bool NumLockEnabled(bool enable = undefined)
Gets or sets num lock key state.
bool ScrollLockEnabled(bool enable = undefined)
Gets or sets scroll lock key state.
bool IsProcRunning(int pid)
Determines if the specified process is running.
int GetProcMainWnd(int pid)
Returns the specified process's main window handle.
bool KillProc(int pid)
Kills the specified process.
bool CloseWnd(int hWnd)
Closes the specified window.
bool ShowWnd(int hWnd, bool noActivate = false)
Shows and activates the specified window. Activation is optional.
bool RestoreWnd(int hWnd)
Restores the specified window to the previous show state.
bool HideWnd(int hWnd)
Hides the specified window.
bool MinimizeWnd(int hWnd)
Minimizes the specified window.
bool MaximizeWnd(int hWnd)
Maximizes the specified window.
bool IsWndVisible(int hWnd)
Determines whether the specified window is visible.
bool IsWndMinimized(int hWnd)
Determines whether the specified window is minimized.
bool SetActiveWnd(int hWnd)
Activates the specified window.
bool SendWndToBack(int hWnd)
Sends the specified window to the bottom of the z-order.
bool BringWndToFront(int hWnd)
Attempts to bring the specified window to the top of the z-order.
bool SetWndTopMost(int hWnd, bool topMost)
Sets the top-most property of the specified window.
bool SetOwnerWnd(int hWnd, int hWndNewOwner)
Attempts to make hWndNewOwner the owner of hWnd.
string GetWndBounds(int hWnd)
Returns the size and location of the specified window.
bool SetWndBounds(int hWnd, int x, int y, int w, int h)
Sets the size and location of the specified window.
bool SetWndPosition(int hWnd, int x, int y)
Sets the location of the specified window.
bool SetWndSize(int hWnd, int w, int h)
Sets the size of the specified window.
int FindWnd(string title = null, string className = null)
Searches for a top-level window by title and class name.
int GetWndProcId(int hWnd)
Returns the process id that a window belogs to.
bool LogOffMachine(bool force = false)
Logs out of the current system user.
bool RestartMachine(bool force = false)
Reboots the system.
bool ShutDownMachine(bool force = false)
Shuts down the system.
int64 GetSystemUptimeMs()
Gets the system uptime in milliseconds.
void NudgeMouse()
Moves the mouse 1 pixel and then back.