GameMaker Studio 2

Process Info

Samuel Venable

You must be logged in to obtain assets

Contact Publisher


Deprecates the former Execute Shell and Evaluate Shell extensions. This extension is intended for advanced users only, and if you need help, do not hesitate to click the "Contact Publisher" link for any questions you might have, or if you are in need of support.

The macOS dylib file is not code signed; please code sign it before testing and distributing for macOS.

Process Information

Allows executing, reading, and manipulating various information from application processes.

The library's source code can also be easily used in your C++ projects, (which is how I included a BSD build screenshot).

  • process_t - process identifier (real) - on Windows, this is a typdef of a DWORD (unsigned long), and on Mac/Linux it is a pid_t (signed long). Safely casted to a double for GameMaker extension compatibility.

  • window_t - window handle (pointer) - HWND (void *) on Windows, NSWindow * (void *) on Mac, and Window (unsigned long) on Linux. Casted to a void * for generic, cross-platform compatibility, using the same header.

  • wid_t - window identifier (string) - a std::string (basic_string) wrapping a window id number in quotes for use in various interpreted scripting languages like VBScript on Windows or AppleScript on Mac, or shell programs like Zenity on Linux. On Windows, this number is a std::to_string((unsigned long long)HWND), on Mac, this is a std::to_string((unsigned long)CGWindowID), and on Linux is is a std::to_string((unsigned long)Window). This string can be used to represent the shell scripting equivalent for a global window handle.

// Execute process, returns process id

process_t process_execute(string command);

// Execute process outside main thread

void process_execute_async(string command);

// Return previous executed process id

process_t process_previous();

// Evaluate last process output string

string process_evaluate();

// Clears previous process id executed

void process_clear_pid();

// Clears previous process output text

void process_clear_out();

// Get process id from current process

process_t pid_from_self();

// Parent process id from this process

process_t ppid_from_self();

// Get executable path from process id

string path_from_pid(process_t pid);

// Get exe parent path from process id

string dir_from_pid(process_t pid);

// Get executable name from process id

string name_from_pid(process_t pid);

// Return command line from process id

string cmd_from_pid(process_t pid);

// Return environ vars from process id

string env_from_pid(process_t pid);

// Check for existence from process id

bool pid_exists(process_t pid);

// Check existence for given window id

bool wid_exists(wid_t wid);

// Kill an application from process id

bool pid_kill(process_t pid);

// Return window handle from window id

window_t window_from_wid(wid_t wid);

// Return window id from window handle

wid_t wid_from_window(window_t window);

// Get owner process id from window id

process_t pid_from_wid(wid_t wid);

// Return strings for every process id

string pids_enum(bool trim_dir, bool trim_empty);

// Get parent process id of process id

process_t ppid_from_pid(process_t pid);

// Get list of process ids from parent

string pids_from_ppid(process_t ppid);

// Get list of window ids from process

string wids_from_pid(process_t pid);

// Get window id from frontmost window

wid_t wid_from_top();

// Get process id from topmost process

process_t pid_from_top();

// Bring window id to frontmost window

void wid_to_top(wid_t wid);

// Add a parent window id to window id

void wid_set_pwid(wid_t wid, wid_t pwid);

// Return output of a given expression

string echo(string expression);

End User Licence Agreement (EULA).

Age Rating: 4+


GMS2 - Version 0.1.0. Published July 12, 2020

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait

Back to Top