以下脚本在Sketchup中作为ruby脚本执行。
notepad = File.absolute_path("notepad.exe", "C:/Windows")
puts "fileName :"+notepad
exec((notepad))关闭notepad.exe窗口时...它还可以关闭/退出Sketchup。如何只关闭notepad.exe而不关闭Sketchup?
非常感谢
发布于 2018-02-01 16:36:49
您使用的是exec来运行记事本,但根据documentation exec的说法,取代了的当前进程。尝试使用system方法运行命令-它执行子subshell中的命令
https://stackoverflow.com/questions/48556829
复制相似问题