Sign in to follow this  
Followers 0
Alexandra

Get state for CheckListBox

5 posts in this topic

Hi All,

I have read some topics and founded how can I Check or unCheck item in CheckListbox. But I didn't find, how can I get state of each item om this control.

Could anyone helps me with this problem, please?

Share this post


Link to post
Share on other sites



Please see GUICtrlGetState.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Please see GUICtrlGetState.

tnx, but it works only for elements created with GUICtrlCreate... function.

And I'm trying to reach control from other application, I need to control this application depends on states of items in it's CheckListbox

Share this post


Link to post
Share on other sites

so, can anybody help me please?

I need it prompt for my work

Share this post


Link to post
Share on other sites

This should work: Use Autoits Window Info tool to get the control id of the checkbox in question. Then the following code should do the trick:

#Include <GuiButton.au3>

$Chandle = ControlGetHandle("<Your Window Title>","",<Your Contol Id>)
$state = _GUICtrlButton_GetCheck($Chandle)
If $state = $BST_CHECKED Then
    MsgBox(0,"","Checked")
Else
    MsgBox(0,"","UnChecked")
EndIf

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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