Swimming_Bird Posted January 24, 2006 Posted January 24, 2006 I'd like to do : Case $msg = $array[all] is there any way to do such a thing? bascially i have a bunch of checkboxes set up as an array and i want it so that whenever i check or uncheck this box it'll disable/enable a control. I cant think of any way to do this but brute force. Thanks
MHz Posted January 24, 2006 Posted January 24, 2006 Nothing prevents you from using a For loop in a message loop to test the array. Have it outside of your Select Case block.
Swimming_Bird Posted January 24, 2006 Author Posted January 24, 2006 what do you mean by message loop?
MHz Posted January 24, 2006 Posted January 24, 2006 (edited) A loop that uses GuiGetMsg to retrieve messages from the Gui. Only problem that you may incur for testing a large array in a constant loop is CPU usage perhaps being high, but that can be judged upon testing the script. Edit: An example While 1 $msg = GUIGetMsg() Select Case $msg = -3 Exit Case $msg = <= 0 ContinueLoop EndSelect For $i = 0 To UBound($array)-1 If $msg = $array[$i] Then ; do the action EndIf Next WEnd Edited January 24, 2006 by MHz
CyberSlug Posted January 24, 2006 Posted January 24, 2006 Case $msg >= $array[0] And $msg <= $array[uBound($array)-1] Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Swimming_Bird Posted January 24, 2006 Author Posted January 24, 2006 Case $msg >= $array[0] And $msg <= $array[uBound($array)-1]You are truely a god among men my good friend. Worked great thanks.
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