Jump to content
Sign in to follow this  
Alexandra

Get state for CheckListBox

Recommended Posts

Alexandra

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
water

Please see GUICtrlGetState.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Alexandra

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
Alexandra

so, can anybody help me please?

I need it prompt for my work

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
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  

×