Jump to content

Embedded Check Boxes in ListView controls


dem3tre
 Share

Recommended Posts

I am trying to script a workaround for a problem we are having using IBM Access Connections v3.81 with distributed profiles. In order to do so, I need to be able to access the embedded check boxes within a ListView control.

A screen shot of the ListView control I'm interested in is attached as listbox.jpg.

A screen shot of the AU3Info output for this ListView is attached as auinfo.jpg.

Using ControlListView I can select/deselect the listview items but I cannot get the check boxes to toggle. I've looked at ControlCommand but since I don't have a ControlID for the checkboxes it doesn't seem to be applicable. I also tried using AU3Recorder and the AutoitMacroGenerator but they don't sense the checkbox or its toggling state either.

The only idea I have left to try is to simulate a doubleclick over the proper checkbox but that seems pretty spotty at best.

Is this even possible?

Thanks in advance.

Michael

Link to comment
Share on other sites

From the latest beta:

Sets the checked state of a list-view control item

_GUICtrlListViewSetCheckState($h_listview, $i_index[, $i_check = 1])

For specifying the listview handle:

Retrieves the internal handle of a control.

ControlGetHandle ( "title", "text", controlID )

Link to comment
Share on other sites

Hello.

I just downloaded the latest beta so that I could use this function.

Basically, I need to check a box in a list view.

When I attempt t execute the code with the beta version, I get this:

_GUICtrlListViewSetCheckState($h_listview, $listIndex, 1)

^ ERROR

Error: Unknown function name.

Any suggestions?

Link to comment
Share on other sites

Hello.

I just downloaded the latest beta so that I could use this function.

Basically, I need to check a box in a list view.

When I attempt t execute the code with the beta version, I get this:

Any suggestions?

Have you tried the example in the help file ?


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Thank you both for your fast replies.

I am certain I am running with the beta.

My problem was I forgot the includes (Realized that when I looked at the example)

Now the script runs without errors but it doesnt actully check the box in the list view.

My Code

$listIndex = ControlListView ("Protected EAP Properties", "", "SysListView321", "FindItem", "Thawte Server CA")

$h_listview = ControlGetHandle ( "Protected EAP Properties", "", "SysListView321" )

_GUICtrlListViewSetCheckState($h_listview, $listIndex)
Link to comment
Share on other sites

Thank you both for your fast replies.

I am certain I am running with the beta.

My problem was I forgot the includes (Realized that when I looked at the example)

Now the script runs without errors but it doesnt actully check the box in the list view.

My Code

$listIndex = ControlListView ("Protected EAP Properties", "", "SysListView321", "FindItem", "Thawte Server CA")

$h_listview = ControlGetHandle ( "Protected EAP Properties", "", "SysListView321" )

_GUICtrlListViewSetCheckState($h_listview, $listIndex)

The UDFs were written to be used with the AutoIt Controls, currently the external controls are not supported as of yet with the GUIListView UDFs.

I believe someone else wanted to do the same thing with an external control, but it was a while ago and I don't have time to search for the code in the forum.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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