Jump to content

AutoItX3.Control.ObjCreate not working in Ruby.


Recommended Posts

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

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 by CaffeineJunky
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...