Originally Posted by
onurb
Just going to keep an on going thread for myself here instead of making a thread every time I have a question. I'll end up filling up the forums!
My next question is...
I want to kill a script, but it could be any one of these scripts:
big_apple.lic
red_apple.lic
small_apple.lic
Is there a wild card character I can use to circumvent having to type in every script?
if Script.running?("$_apple")
kill_script("$_apple")
end
I am sure this isnt the correct characters to use, but do you see what I am saying?
Thanks for all the help so far...
If you mean you want to kill those scripts if they are running you could do this:
Code:
all_scripts = [ "big_apple", "red_apple", "small_apple" ]
all_scripts.each{ |script_name| kill_script script_name }
That would kill each listed script.