mmcolli00 Posted May 7, 2009 Posted May 7, 2009 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")
PsaltyDS Posted May 7, 2009 Posted May 7, 2009 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") Do the functions that work have parameters wrapped in parens? I ask because the example from the help file is: oAutoIt.ControlListView "C:\Program Files\NSIS", "", "SysListView321", "Deselect", "2", "5" Your error is "Invalid number of parameters" and you list them in parens where the example does not. There is a forum dedicated to the AutoItX functionality: ActiveX/COM Help and Support (AutoItX) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
mmcolli00 Posted May 7, 2009 Author Posted May 7, 2009 Does this mean that if something has option parameters that I am supposed to put "" as a placeholder? BTW - thanks for telling me about the other area to post. I will do that too. - MC
PsaltyDS Posted May 8, 2009 Posted May 8, 2009 (edited) Does this mean that if something has option parameters that I am supposed to put "" as a placeholder? BTW - thanks for telling me about the other area to post. I will do that too. - MCAs a direct answer, yes optional parameters like the second one (window text) in WinWait should have place holders if you want to use any parameters after it, but you did that in your example with "". Optional parameters AFTER the last significant parameter are not required, so you don't have to provide a placeholder for the sixth parameter when you only need the first five.I think you have the correct number of parameters, I was just asking (because I don't know Ruby) if the syntax should include those parens around the parameters. A quick search in the AutoItX forum turned up an example that it should.Of course, I could have done that search yesterday and avoided the dumb question. Sorry for the distraction! Edited May 8, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now