CaffeineJunky Posted April 17, 2012 Share Posted April 17, 2012 I'm trying to create a bit of automation for a VSFlexGrid using Ruby's WIN32OLE wrapper. I have located the COM object responsible for plaguing me, and I want to conquer it by creating a reference to the COM object and then calling the functions to do my bidding. I thought the proper thing to do would be to call AutoItX3.Control.ObjCreate("VSFlexGrid8.VSFlexGridN") to get access to the COM obect, but I'm getting an error that ObjCreate does not exist as a method. Does AutoItX3.Control not possess ObjCreate? If not, is there a work around? Link to comment Share on other sites More sharing options...
CaffeineJunky Posted April 18, 2012 Author Share Posted April 18, 2012 (edited) Here's a slight update on the information to help me understand this problem. Ruby (as of 1.8?) has built-in support to run OLE thingies: the WIN32OLE object. This works by creating an instance of the class with the Version Independent Program ID (VIProgID). This class is nice enough to have a couple of helper methods to provide the user with a list of the available functions: [ Ruby Implementation: WIN32OLE.new('AutoItX3.Control).ole_func_methods ] QueryInterface AddRef Release GetTypeInfoCount GetTypeInfo GetIDsOfNames Invoke Init AutoItSetOption BlockInput CDTray ClipGet ClipPut ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPosX ControlGetPosY ControlGetPosHeight ControlGetPosWidth ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView DriveMapAdd DriveMapDel DriveMapGet IniDelete IniRead IniWrite IsAdmin MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPosX MouseGetPosY MouseMove MouseUp MouseWheel Opt PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessSetPriority ProcessWait ProcessWaitClose RegDeleteKey RegDeleteVal RegEnumKey RegEnumVal RegRead RegWrite Run RunAsSet RunWait Send Shutdown Sleep StatusbarGetText ToolTip WinActivate WinActive WinClose WinExists WinGetCaretPosX WinGetCaretPosY WinGetClassList WinGetClientSizeHeight WinGetClientSizeWidth WinGetHandle WinGetPosX WinGetPosY WinGetPosHeight WinGetPosWidth WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive GetTypeInfoCount GetTypeInfo GetIDsOfNames Invoke I've been noticing that there are many missing, such as ObjXXX, WinFlash, etc. Are these in some other DLL or are these unable to be used outside of the main AutoIt language? Edited April 18, 2012 by CaffeineJunky Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 18, 2012 Share Posted April 18, 2012 AutoItX is only an incomplete subset of AutoIt. That isn't likely to change. Link to comment Share on other sites More sharing options...
CaffeineJunky Posted April 19, 2012 Author Share Posted April 19, 2012 All right, thanks for the response. I'll have to suppose there's no way to work with non-standard control then. Maybe I can interface with these things directly with ruby's WIN32OLE; that seems to be my only option. Link to comment Share on other sites More sharing options...
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