Jump to content

Help - Activex Control (ocx)


Rofellos
 Share

Recommended Posts

@KingNED ObjCreate() is for creating objects, not for manipulating them.

Hello Rofellos,

First, Welcome to the AutoIt Forums :graduated:

If this control is in a Web Browser, than I would suggest looking at the IE.au3 UDF provided with the offical AutoIt download. The Help file also contains great documentation on this excellent 'User Defined Funtion'.

If this control is in an application then you could use many of the Control functions to interact with then such as ControlGetText(), ControlSend() or ControlCommand(). There are a handful of others, and the Help File is well documented on them as well with examples.

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Rofellos,

There is another great tool that comes with the official AutoIt download. It's called 'AutoIt Window Info' tool. File Name is Au3Info.exe. This tool will let you snoop a little into windows, giving you Control ID's and window text including Hidden Text. It does not work with every type of window, I know it works well with most Window's Based applications. Give it a try by dragging the crosshairs to the control you wish to obtain info on. Then in the Edit window on the bottom of the Window Info Tool, click on the 'Control' Tab. There you will obtain all the info you need to manipulate the controls of your window.

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Realm thanks,

Actually I used the ControlSend, not the ControlSetTex. ControlSetTex and ControlGetText don't work. And ControlCommand don't have a command to do this.

To set text I can use Send, but I don't want to. But the problem is to get the text.

I already use the AutoIt Info Tool.

Rofellos.

Link to comment
Share on other sites

The TStringAlignGrid is a control that shows a list of strings. You can click on a string to edit. I can access each string by using the ControlCommand{ "TabLeft" or "TabRight" }. Using the ControlSend I set the text. But get the text still a problem.

I think use MouseClick and Send( {Control + c} ) is not a good idea.

*ControlSetText and ControlGetText don't work.

Link to comment
Share on other sites

Rofellos

First set the selection in the Combobox/Listbox with ControlCommand() with command "SelectString", 'string'. Second use ControlCommand() with command "GetCurrentSelection", "".

Hopefully that will work for you :graduated:

Realm

Edit: Sorry still have not woken up yet, You don't need the first step to see what the current selection is.

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Rofellos,

I have never attempted to manipulate a grid before, but after searching the forums I found this handy piece of advice from this topic:

Once you have seleted the item you want to obtain, use this example (modified to your custom parameters of coarse) to get your information.

ControlSend("myForm", "", $cntrlId, "^c")
ControlSend("myForm", "", $cntrlId, "^v")

Hope this helps.

Realm

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

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