What is the COM interface for ruby?

  • Thread starter Just Another Victim of the Ambient Morality
  • Start date
J

Just Another Victim of the Ambient Morality

This may sound like a dumb question but please bear with me as I barely
know what I'm asking...

Surely, there is a library that allows a ruby script to interface with
COM objects. What is this library? I would have simply done a search,
either on the 'net or on usenet (groups.google.com), but it's hard to do a
search for "COM" without getting too many false positives...
Thank you!
 
D

Daniel Berger

Just said:
This may sound like a dumb question but please bear with me as I barely
know what I'm asking...

Surely, there is a library that allows a ruby script to interface with
COM objects. What is this library? I would have simply done a search,
either on the 'net or on usenet (groups.google.com), but it's hard to do a
search for "COM" without getting too many false positives...
Thank you!

win32ole

Regards,

Dan
 
J

Just Another Victim of the Ambient Morality

Thank you, Daniel, for your quick response. It was your post that I got
first and it helped me make some progress!


greg.rb said:
here is a good link if you want to knock around excel:
http://www.rubygarden.com/ruby/ruby?action=browse&id=ScriptingExcel

Since you seem eager to discuss using win32ole, let me ask you a
question. What I'm actually trying to do is write some iTunes scripts in
(the wonderful language that is) Ruby and I'm having trouble comparing
Apple's documentation with what I have currently figured out about win32ole.
A supposed method of the iTunes COM interface is PlayerPosition(long)
but there's another method, PlayerPosition(long*), with exactly the same
name but a different (and return) parameter. How do I invoke either of
these?
I am able to call methods like Play() just fine, perhaps because they
take no parameters. In fact, I'm surprised that I'm able to do this since
printing the list of methods of WIN32OLE doesn't reveal methods like Play().
I am assuming that some exception handling has been implemented (or
overridden) by the class to probe the COM interface for the named method
but, again, I don't really know what's going on or even what I'm doing.
Some insight into this would be helpful and greatly appreciated!
Thank you...
 
M

Méta-MCI

Hello!

*sorry for my bad 'BabelFished' english*

I produced a COM-server which makes it possible to call, publicly, of the
functions and the Ruby methods.
But:
- it is experimental,
- the COM-server is produced in Python,
- the call of Ruby uses active-scripting (ActiveRuby),
- the COM-server being dynamic, it makes it possible to apply a Ruby method
to a Python object. That is one more, compared to simple ActiveScripting
- afflicted, I tested only with Object-PAL and Python (and very small
test/call from Excel/VBA)
- that is now integrated in a larger project
- this message was translated with BabelFish.
- all comments, in the code, are in french
- I will show this realization at the Paradox-Convention, in Eindhoven, at
the end of May.

Lastly, I am complètre overflowed of work

@-salutations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,206
Messages
2,571,068
Members
47,674
Latest member
scazeho

Latest Threads

Top