Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Documentation for xProcess

A topic by xijniN created Apr 28, 2024 Views: 380 Replies: 2
Viewing posts 1 to 3

Please, i cant find anything about how to use it :(

Developer

for starters, most basic usage is covered here:

http://gamemaker.info/en/manual#execute_program

execute_program(prog,arg,wait) Executes program prog with arguments arg. wait indicates whether to wait for finishing.
execute_shell(prog,arg) Executes the program (or file) in the shell.

Note in order to open a file with execute_shell you will need to specify as a first command line parameter in the prog argument the desired executable to open the file with passed in the arg argument. arg can contain multiple arguments, and they are space separated, so if you want to use a file path, flag, or paremeter with spaces in it, enclose it within single or double quotes (within the initial quotes representing it as a string).

Here's an example:

execute_shell(@'cmd', @'"' + working_directory + @'batch_file.bat"');

or if you need the wait argument to make the call synchronous, use execute_program() instead, like so:

execute_program(@'cmd', @'"' + working_directory + @'batch_file.bat"', true);


if the prog argument in execute_shell or execute_program is command prompt (cmd.exe, cmd, or the absolute path to it, even) it will automatically have /c passed to it so the hidden command prompt window automatically closes when the batch_file.bat is done its execution.

I have documentation for (most) of the C++ library this extension is based on, however the C++ function implementations are rather different from the GameMaker implementation, function names, arguments, and usage are slightly different, but should help point you in the right direction:


https://github.com/time-killer-games/xproc/blob/main/README.md

It's on my to-do list to write documentation for the GameMaker-specific implementation. I've been requested this a lot so i will try to make it a priority soon.

Developer (1 edit)

I just completed writing documentation just now for the GameMaker version of the library:

https://github.com/time-killer-games/libxprocess/blob/main/README.md

Please contact me on discord if you have more questions or need one-on-one assistance.

My discord handle is: samuelvenable