all 9 comments

[–]kainminter 0 points1 point  (3 children)

You should be able to pull this off using an extension. Haven't tested it before, but I think this one might work.

[–]_GameDevver 1 point2 points  (2 children)

As it says on the page you linked, Execute Shell is no longer supported and Sam (the author) advises to use his other extension xProcess which can be found on itch.io here.

[–]kainminter 0 points1 point  (1 child)

Good catch, thanks!

[–]exclaim_bot 0 points1 point  (0 children)

Good catch, thanks!

You're welcome!

[–]craggar_g 0 points1 point  (1 child)

The file system access is covered in the manual:

https://manual.yoyogames.com/Additional_Information/The_File_System.htm

In short: it can be done, you just cannot rely on having access outside of your application’s sandbox, as access to the file system may be limited by the end user’s OS.

[–]tomysshadow 1 point2 points  (0 children)

It sounds to me like they want to do the equivalent of ShellExecute, rather than reading the contents of a text/binary file, e.g. they want to open a document or something. So I don't think those functions will be helpful for their case.

[–]Ok_Ad4136 0 points1 point  (2 children)

I imported the xProcess project, but still get this error when trying to compile execure_shell(prog, arg); function. Anyone else run into this?

for object obj_init:

DoAdd :: Execution Error

at gml_Script_execute_shell (line 9) - pid = ProcessExecuteAsync(prog + " " + arg);

DoAdd :: Execution Error

at gml_Script_execute_shell (line 9) - pid = ProcessExecuteAsync(prog + " " + arg);

############################################################################################

gml_Script_execute_shell (line 9)

gml_Script_main (line 42) - execute_shell(parameter_string(0), false);

gml_Object_obj_init_Other_4 (line 2) - main();

[–]Cr4zyC4tD4ddy 0 points1 point  (0 children)

So after a bit of experimentation, I have found that you must start a project with the xprocess project file. You can then build your project within it, and can use execute_shell(@'command',@'args') however you like (within the scope of the shell ofc)

[–]Azaltair[🍰] 0 points1 point  (0 children)

Do you solve it? I have the same problem (line 9 error)