mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 22:46:19 +01:00
19 lines
No EOL
602 B
Text
19 lines
No EOL
602 B
Text
function shellOpenExplorer(path) {
|
|
var _windir = environment_get_variable("WINDIR") + "/explorer.exe";
|
|
path = string_replace_all(path, "/", "\\");
|
|
shell_execute(_windir, path);
|
|
}
|
|
|
|
function shell_execute(path, command, ref = noone) {
|
|
gml_pragma("forceinline");
|
|
|
|
var txt = $"{path} {command}";
|
|
noti_status(txt, THEME.noti_icon_console,, ref);
|
|
|
|
try {
|
|
var res = execute_shell(path, command);
|
|
noti_status("Execute shell complete", THEME.noti_icon_console,, ref);
|
|
} catch(e) {
|
|
noti_warning($"Execute shell failed: {e}", THEME.noti_icon_console_failed, COLORS._main_value_negative, ref);
|
|
}
|
|
} |