Sign in to follow this  
Followers 0
Rofellos

Help - Activex Control (ocx)

13 posts in this topic

How do I send/get text to a ActiveX control?? (ocx)

The name of the control is TStringAlignGrid.

Help please.

Share this post


Link to post
Share on other sites



Please. Anyone.

Share this post


Link to post
Share on other sites

How do I send/get text to a ActiveX control?? (ocx)

The name of the control is TStringAlignGrid.

Help please.

You should try ObjCreate()

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks Realm!

It's in a Delphi application. ControlCommand and ControlSetText worked well. But I still have problems with get the information from the control. ControlGetText isn't working.

Share this post


Link to post
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.  

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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.  

Share this post


Link to post
Share on other sites

I already try all controls in ControlCommand().

I don't no what else to do.

*I attached a image file.

post-61419-0-03960900-1290784388_thumb.j

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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.  

Share this post


Link to post
Share on other sites

Thanks Realm, help me a lot.

Share this post


Link to post
Share on other sites

Thanks Realm, help me a lot.

My pleasure, I had the time :graduated:


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.  

Share this post


Link to post
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
Sign in to follow this  
Followers 0