Jump to content
Sign in to follow this  
Gilby

Interacting with a PropertyGrid

Recommended Posts

Gilby

Hello all,

I am developing a script for which I need to be able to interact with a PropertyGrid control. The control also appears to have nested edit controls, though I'm not sure about this.

As an example of what I mean by "PropertyGrid" control, here's a screenshot that looks just like the interface I need to deal with (this isn't the same one I'm working with):

Posted Image

I need to be able to do things like see if there are any properties that are editable, find them by name / index, edit the properties, etc (this is for automation of an internal company application). I can't figure out how to do this and I've tried everything I know. I tried reading about COM objects and stuff but that's starting to go over my head.

(I don't have any specific code snippets to share since I really haven't even found the right place to start with this.)

Thank you!

Share this post


Link to post
Share on other sites
poorvajain

Same problem i have .... Unable to resolution How to handle PropertyGrid controls using ur tool

Edited by poorvajain

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

Welcome to the AutoIt forum. :)

I suggest you use the AutoIt Window Info tool ("M:ProgramAutoIt3Au3Info.exe" if you did a standard install) and post the results you get when you look at the internal "edits" of the control. We might then be able to suggest some things that you can try - but if the overall control is custom-built and does not use the standard API then your options are likely to be very limited. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
poorvajain

I used AutoiT Window Info Tool. I am developing script of Standard Property Grid. Property grid is as same as Visual studio use...

For each entity, there is vertical property grid which has several properties and each property is editable. I need to interact with them....

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

So post the results that you got in the "Control" tab of the Info tool and we will try and help. Without that data we can do nothing as we have no idea what parameters to use in the various commands that might prove useful. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
poorvajain

Control Tab Data of Property Grid:

Class: WindowsForms10.window.8.app.0.3b95145

Instance: 26

ClassnameNN: WindowsForms10.window.8.app.0.3b9514526

Name:

Advanced Mode: [CLASS:WindowsForms10.window.8.app.0.3b95145; INSTANCE:26]

ID: 2294502

text: PropertyGridView

Position: 965, 96

Size: 313, 761

ControlClick Coords: 101, 217

Style: 0x56010000

ExStyle 0x00000000

Handle: 0x002302E6

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

Try something like this to see if you can get the existing text from within one of the editable controls:

$sText = ControlGetText($sWin_Title, "", "[CLASS:WindowsForms10.window.8.app.0.3b95145; INSTANCE:26]")

Set $sWin_Title to the value you see in the "Basic Window Info" section of the tool and adjust the controlID value to match the data returned from the specific control you are using.

Do you get the correct text returned? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

Then it looks as if you cannot interact with the control. :(

M23

Edit: But some more searching has thrown up this thread with its suggestion of using:

Opt("WinSearchChildren", 1)

perhaps it might help. :)

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
poorvajain

I tried and able to get the control handle of Property grid but not able to interact with its properties....

Return result of given code is "PropertyGridView"

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

Then I am afraid that you will have to wait to see if anyone else can provide a clue as I have no more ideas. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
poorvajain

Thanks for your help!! :shifty:

I tried some functions and get desired result

; Get control Text
 
Local $text = ControlGetText ("Black Diamond Designer","", "[CLASS:WindowsForms10.window.8.app.0.3b95145; INSTANCE:26]")
; Highlight the Control
Local $Show_Control = ControlShow("Black Diamond Designer","", $text)
; Get focus on that control
ControlFocus ("Black Diamond Designer","", $text)
; Now access the tree view of property grid
ControlTreeView("Black Diamond Designer","", $text, "Select", "#0")
Send ("{Tab}")
  Send ("{BS 32}")
  Send ("Test_pro")
  Send ("{Enter}")

Share this post


Link to post
Share on other sites
Melba23

poorvajain,

Great! :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
poorvajain

I get desired result for first 2-3 properties it is random solution ....

I need some proper code which interact with internal entities of property grid... i mean identify the property first and then give input.

Not able to identify the individual property of property grid???

Treeview is not working for Property grid

Share this post


Link to post
Share on other sites
poorvajain

Is anyone can help to write script of Propertygrid..... How to interact with internal entities of propertygrid??

Edited by poorvajain

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.