P
Phrogz
I want to be able to drag and drop a txt file onto my ruby program,
such that I get the full file path to the txt file in ARGV[0].
I found a page that showed me how to:
a) Create a .bat file with "ruby myprog.rb %1"
b) Create a shortcut to the .bat file with a hardcoded working
directory
But I need to be able to move this .bat/.rb file around and have the
working directory properly updated. (There are support files adjacent
to the .rb that I need to read in.)
Surely there's a better way. Some registry hack to make .rb files
drag-and-drop targets by themselves?
such that I get the full file path to the txt file in ARGV[0].
I found a page that showed me how to:
a) Create a .bat file with "ruby myprog.rb %1"
b) Create a shortcut to the .bat file with a hardcoded working
directory
But I need to be able to move this .bat/.rb file around and have the
working directory properly updated. (There are support files adjacent
to the .rb that I need to read in.)
Surely there's a better way. Some registry hack to make .rb files
drag-and-drop targets by themselves?