I'm making a map editor much alike RMXP's in Ruby, but with native integration of my own scripts. What I'm trying to do is be able to go Right Click > Open With > Editor.bat and have it open my application.
Passing "ruby editor.rb maps/map.gmp" works okay.
I've tried "ruby editor.rb %~f1" and many other variants in batch but they all don't work - it pretty much ignores the ruby line completely, ending at the trailing pause. I inserted a snippit of code at the first line of my editor.rb to print the contents of ARGV to a file, but that doesn't even make the file. If I run the batch normally, it opens the new project screen fine, but when I open a file with the editor.bat it just crashes and doesn't run any Ruby at all.
How do I pass batch arguments to script arguments?
Passing "ruby editor.rb maps/map.gmp" works okay.
I've tried "ruby editor.rb %~f1" and many other variants in batch but they all don't work - it pretty much ignores the ruby line completely, ending at the trailing pause. I inserted a snippit of code at the first line of my editor.rb to print the contents of ARGV to a file, but that doesn't even make the file. If I run the batch normally, it opens the new project screen fine, but when I open a file with the editor.bat it just crashes and doesn't run any Ruby at all.
How do I pass batch arguments to script arguments?