[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using AutoItX3 object to find value in list - getting error

Mmcolli00 Mom

5/7/2009 6:21:00 PM

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")
--
Posted via http://www.ruby-....

1 Answer

Marvin Gülker

5/7/2009 8:32:00 PM

0

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
--
Posted via http://www.ruby-....