Masaki Suketa
5/6/2007 11:49:00 AM
Hello,
In message "WIN32OLE and Shell.Application problem"
on 07/05/06, "=?utf-8?Q?Eder_Qui=c3=b1ones?=" <eder.sq@gmail.com> writes:
> cdroms.each do | name |
>
> @ej1 = @shell.NameSpace(name)
> @ej2 = @ej1.Self
> @ej3 = @ej2.InvokeVerb("Expu&lsar")
>
It is known problem.
InvokeVerb does not work in Win32OLE (in Ruby 1.8).
Instead try to use doIt.
@ej1 = @shell.NameSpace(name)
@ej2 = @ej1.Self
verbs = @ej2.verbs
verb = nil
verbs.each do |v|
if v.name == "Expu&lsar"
verb = v
end
end
if verb
verb.doIt
end
FYI, in Ruby 1.9, InvokeVerb works by using WIN32OLE_VARIANT class.
@ej3 = @ej2.InvokeVerb(WIN32OLE_VARIANT.new("Expu&lsar"))
Regards,
Masaki Suketa