diff --git a/raspberryjammod/init.lua b/raspberryjammod/init.lua index d1f3d22..34279a0 100644 --- a/raspberryjammod/init.lua +++ b/raspberryjammod/init.lua @@ -253,6 +253,15 @@ function handle_events(cmd, args) return nil end +function background_launch(window_identifier, cmd, args) + if not is_windows then return false end + local cmdline = 'start "' .. window_identifier .. ' /MIN "' .. cmd .. '" ' + for i = 1,#args do + cmdline = cmdline .. '"' . args[i] . '"' + end + os.execute(cmdline) +end + function handle_command(line) local cmd, argtext = string.match(line, "([^(]+)%((.*)%)") if not cmd then return end diff --git a/raspberryjammod/launch.lua b/raspberryjammod/launch.lua new file mode 100644 index 0000000..4956fb8 --- /dev/null +++ b/raspberryjammod/launch.lua @@ -0,0 +1,8 @@ +local source = debug.getinfo(1).source:sub(2) + +print(os.execute('start /MIN "raspberryjammod-minetest-python-test" /MIN "c:\\pypy\\pypy.exe" test.py')) +print("running") +print(os.execute('taskkill /F /FI "WINDOWTITLE eq raspberryjammod-minetest-python-test"')) +print("done") +while 1 do end +