Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby Sketchup ... exit

Tags:

ruby

sketchup

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

like image 694
user1803095 Avatar asked Dec 05 '25 16:12

user1803095


1 Answers

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

like image 187
Aliaksei Kliuchnikau Avatar answered Dec 08 '25 07:12

Aliaksei Kliuchnikau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!