# Using AutoItX3 object to find value in list - getting error

**URL:** <https://www.ruby-forum.com/t/using-autoitx3-object-to-find-value-in-list-getting-error/167441>\
**Category:** Ruby\
**Created:** [May 7, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/using-autoitx3-object-to-find-value-in-list-getting-error/167441 "2009-05-07T20:21:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmcolli00](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Post date:** [May 7, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/using-autoitx3-object-to-find-value-in-list-getting-error/167441/1 "2009-05-07T20:21:22Z")

</div>

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   
  
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”)

---

<div class="post-metadata">

**Author:** ![mmcolli00](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Post date:** [May 7, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/using-autoitx3-object-to-find-value-in-list-getting-error/167441/2 "2009-05-07T22:32:17Z")

</div>

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   
>   
> 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
