Forum: Ruby Using AutoItX3 object to find value in list - getting error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cf63da956b6ba955687a2f2f262928cb?d=identicon&s=25 Mmcolli00 Mom (mmcolli00)
on 2009-05-07 20:21
Hi
I am using AutoIt inside my ruby script. The purpose for this is so that
I can check if there is a value, specifically 3432432.exe in a list. I
can't figure out why the method ControlListView is not working. Other
methods are working fine with the AutoItX3 control. Do you know what I
might be missing? The error is below. Thanks MC

Error:
in `method_missing': ControlListView (WIN32OLERuntimeError)
    OLE error code:0 in <Unknown>
      <No Description>
    HRESULT error code:0x8002000e
      Invalid number of parameters.  from preVolume.rb:70

#snippet
winVol = WIN32OLE.new("AutoItX3.Control")
winVol.WinWait("Vol Win","",5)
winVol.ControlListView("Vol Win", "",3,"FindItem","3432432.exe")
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2009-05-07 22:32
Mmcolli00 Mom wrote:
> Hi
> I am using AutoIt inside my ruby script. The purpose for this is so that
> I can check if there is a value, specifically 3432432.exe in a list. I
> can't figure out why the method ControlListView is not working. Other
> methods are working fine with the AutoItX3 control. Do you know what I
> might be missing? The error is below. Thanks MC
>
> Error:
> in `method_missing': ControlListView (WIN32OLERuntimeError)
>     OLE error code:0 in <Unknown>
>       <No Description>
>     HRESULT error code:0x8002000e
>       Invalid number of parameters.  from preVolume.rb:70
>
> #snippet
> winVol = WIN32OLE.new("AutoItX3.Control")
> winVol.WinWait("Vol Win","",5)
> winVol.ControlListView("Vol Win", "",3,"FindItem","3432432.exe")

The AutoItX3 documentation says:
>>ControlTreeView "title", "text", "controlID", "command", "option1", "option2"<<
and
>>option2 | Additional parameter required by some commands; use "" if parameter is not 
required.<<
So I would try:
  winVol.ControlListView("Vol Win", "",3,"FindItem","3432432.exe", "")

Marvin
This topic is locked and can not be replied to.