I would like to save a file with ruby using API32 with “dialog box save”
to choose the filename and the directory, I have no idea to code this,
someone can help me
Thank you
you’ll need a GUI application for Ruby.
There are many … see here: http://www.trug.ca/Ruby_GUI_Toolkits
In addition to the list given there, there are some that use Java via
JRuby …
make a Google search for Monkeybars, Profligacy, Cheri.
I like Shoes most at the moment:
you get some example code for your problem right on this page:
If you know how to do it in C/C++ using the Windows API, then you can
very easily do it in Ruby on Windows using the Win32API. There’s a
getting started in the Pickaxe book
(http://whytheluckystiff.net/ruby/pickaxe/html/win32.html) - but this
is really just a primer. Once you’ve got your head around the
bindings, the real documentation is, of course, in the Windows API
itself, which is all available on msdn.com.
If you’re not familiar with Windows programming in general, then, as
Axel said, you’re better off using an easier GUI toolkit, which will
handle the Windows API stuff for you.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.