Can anyone tell me why this does not work?
require "win32ole"
class MSoftManager < WIN32OLE
def initialize
super(‘Micro.SoftManager’)
end
end
mSMan = MSoftManager.new
I get this error:
`new’: wrong number of arguments (0 for 1) (ArgumentError)
Nobu,
nobu.nokada@softhome.net wrote in message
I got the error, Unknown OLE server : `Micro.SoftManager’.
I got the same error as xellos:
C:\atest\tst_win_ole.rb:9:in `new': wrong # of arguments
(0 for 1) (ArgumentError) from C:\atest\tst_win_ole.rb:9
with this code:
···
#---------------------------------------------
require “win32ole”
class IExplorer < WIN32OLE
def initialize
super("InternetExplorer.Application")
end
end
ie = IExplorer.new
#---------------------------------------------
Your version of WIN32OLE seems quite old.
Where can we get the correct version.
I am using ruby 1.6.8 (2002-12-24) [i586-mswin32] on Win XP Pro.
TIA,
– shanko
I run WIN32OLE 0.5.0
nobu.nokada@softhome.net wrote in message news:200303260023.h2Q0NswE022152@sharui.nakada.kanuma.tochigi.jp…
···
Hi,
At Wed, 26 Mar 2003 04:44:02 +0900, > xellos wrote:
require “win32ole”
class MSoftManager < WIN32OLE
def initialize
super(‘Micro.SoftManager’)
end
end
mSMan = MSoftManager.new
I get this error:
`new’: wrong number of arguments (0 for 1) (ArgumentError)
I got the error, Unknown OLE server : `Micro.SoftManager’.
Your version of WIN32OLE seems quite old.
Hi,
Your version of WIN32OLE seems quite old.
Where can we get the correct version.
I am using ruby 1.6.8 (2002-12-24) [i586-mswin32] on Win XP Pro.
Hmm, I tried with WIN32OLE distributed with 1.8, it is very
different from standalone package and rough, although they are
same 0.5.2.
You need to override WIN32OLE.new.
require "win32ole"
class IExplorer < WIN32OLE
def self.new
super("InternetExplorer.Application")
end
end
ie = IExplorer.new
···
At Wed, 26 Mar 2003 12:46:00 +0900, Shashank Date wrote:
–
Nobu Nakada
“xellos” ashokiitm@yahoo.com wrote in message
I run WIN32OLE 0.5.0
How did you find it out ?
nobu.nokada@softhome.net wrote in message
Hmm, I tried with WIN32OLE distributed with 1.8, it is very
different from standalone package and rough, although they are
same 0.5.2.
Which distribution are you refering to ?
I have compiled 1.8 from its sources using VC++ 6.0 and the
win32ole.so (61,440 bytes) that is generated looks different from
win32ole.so (61,516 bytes) that comes with Andy’s one-click installer.
How do you know what version of WIN32OLE it is ?
You need to override WIN32OLE.new.
require "win32ole"
class IExplorer < WIN32OLE
def self.new
super("InternetExplorer.Application")
end
end
ie = IExplorer.new
Ok, I will try that …
Thanks,
– shanko
I looked in the release notes
“Shashank Date” sdate@everestkc.net wrote in message news:f05f45900e9acf67cf0869850c97b00f@news.teranews.com…
···
“xellos” ashokiitm@yahoo.com wrote in message
I run WIN32OLE 0.5.0
How did you find it out ?
Hi,
Hmm, I tried with WIN32OLE distributed with 1.8, it is very
different from standalone package and rough, although they are
same 0.5.2.
Which distribution are you refering to ?
CVS head.
How do you know what version of WIN32OLE it is ?
WIN32OLE::VERSION should indicate the version, but CVS version
is also 0.5.2.
···
At Wed, 26 Mar 2003 23:28:09 +0900, Shashank Date wrote:
–
Nobu Nakada