Rofellos Posted November 23, 2010 Share Posted November 23, 2010 How do I send/get text to a ActiveX control?? (ocx) The name of the control is TStringAlignGrid. Help please. Link to comment Share on other sites More sharing options...
Rofellos Posted November 24, 2010 Author Share Posted November 24, 2010 Please. Anyone. Link to comment Share on other sites More sharing options...
KingNED Posted November 24, 2010 Share Posted November 24, 2010 How do I send/get text to a ActiveX control?? (ocx)The name of the control is TStringAlignGrid.Help please. You should try ObjCreate() Link to comment Share on other sites More sharing options...
Realm Posted November 24, 2010 Share Posted November 24, 2010 @KingNED ObjCreate() is for creating objects, not for manipulating them.Hello Rofellos,First, Welcome to the AutoIt Forums 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 More sharing options...
Rofellos Posted November 25, 2010 Author Share Posted November 25, 2010 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. Link to comment Share on other sites More sharing options...
Realm Posted November 25, 2010 Share Posted November 25, 2010 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 More sharing options...
Rofellos Posted November 26, 2010 Author Share Posted November 26, 2010 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 More sharing options...
Rofellos Posted November 26, 2010 Author Share Posted November 26, 2010 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 More sharing options...
Realm Posted November 26, 2010 Share Posted November 26, 2010 (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 Realm Edit: Sorry still have not woken up yet, You don't need the first step to see what the current selection is. Edited November 26, 2010 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 More sharing options...
Rofellos Posted November 26, 2010 Author Share Posted November 26, 2010 I already try all controls in ControlCommand(). I don't no what else to do. *I attached a image file. Link to comment Share on other sites More sharing options...
Realm Posted November 26, 2010 Share Posted November 26, 2010 (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 November 26, 2010 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 More sharing options...
Rofellos Posted November 29, 2010 Author Share Posted November 29, 2010 Thanks Realm, help me a lot. Link to comment Share on other sites More sharing options...
Realm Posted November 29, 2010 Share Posted November 29, 2010 Thanks Realm, help me a lot.My pleasure, I had the time 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 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