Right click, Open with

Hey! I’m doing a programming language, and I want to make a program
which allows you to make right click, open with (name of the program).
Is that possible in Ruby?

And how could I do that?
Thanks by the way!

That’s part of the operating system rather than the programming
language, and would usually be done during your program’s installation.

You haven’t told yet, which operating system (respectively Window
manager) you are using.

Nicolás Sc wrote in post #1182730:

Hey! I’m doing a programming language, and I want to make a program
which allows you to make right click, open with (name of the program).
Is that possible in Ruby?

By Clicking icon in taskbarr ( Systray ).

A) first install gui dsl:

gem install Ruiby

B) edit file
C) run it : > ruby xxx.rb

=== xxx.rb:

require ‘Ruiby’

ICON = Ruiby::MEDIA+"/famfamfam/chart_curve.png"

class Application < Ruiby_gtk
def initialize()
super(“systray”,0,0)
move(10000,10000)
systray(0,0) do
syst_icon ICON
syst_add_button(“Files”) { run(“explorer.exe”) }
syst_add_button(“ls”) { run_term(“ls -lF”) }
syst_add_button(“Listen”) { run_term(“netstat -an”,/LISTEN/) }
syst_add_button(“Establish”) { run_term(“netstat
-an”,/ESTABLISH/) }
syst_add_button(“Time-wait”) { run_term(“netstat -an”,/TIME/) }
syst_quit_button true
end
end
def run(cmd) Thread.new { system(cmd) } end
def run_term(cmd,filter=/./)
dialog(cmd) {
t=#{cmd}.each_line.grep(filter).join("")
text_area(600,800,{:font=>“Courier new 10”}).text=t
}
end
def component() end
end
Ruiby.start { Application.new }

===