Jan 232009

Erik Veenstra created two scripts, tar2rubyscript and rubyscript2exe, which essentially grab what you wrote, wrap it up with some other code, bundle it with the ruby executable, and spit out a finished, executable package – which will run on that same OS — so compile it on Windows, get a Windows executable, compile on Linux, get Linux executable, etc.

As I’m a newb, it took me a while to figure out that I need .. ‘stuff’ in the init.rb file. Since I’m writing scripts, I just stuffed the whole simple script in init.rb.. This also means I don’t really understand how to do bigger programs, but I think that with more knowledge than mine, these pages are worth their weight in pixels. Made of gold.

Jan 232009
require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.Visible = 1
ie.navigate "www.google.com"

That’s the basics for it. I found another basic intro from Ruby on Windows blog .. And don’t forget you can instantiate an object and then do something like..

properties = ie.ole_get_methods

to get more information. This comes in very handy 🙂

%d bloggers like this: