3

The following script is executed within Sketchup as a ruby script.

notepad = File.absolute_path("notepad.exe", "C:/Windows")
puts "fileName :"+notepad
exec((notepad))

When closing the notepad.exe windows ... it also close/quit Sketchup. How to only close notepad.exe and not Sketchup ?

Thks

1 Answers1

2

You are using exec to run notepad, but according to documentation exec replaces the current process. Try running the command using system method instead - it executes command in a subshell

Aliaksei Kliuchnikau
  • 13,589
  • 4
  • 59
  • 72