Last active
December 12, 2015 10:18
-
-
Save TLMcode/4757894 to your computer and use it in GitHub Desktop.
Returns a list of checked items from a standard ListView Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LVGetCheckedItems(cN,wN) { | |
ControlGet, LVItems, List,, % cN, % wN | |
Item:=Object() | |
While Pos | |
Pos:=RegExMatch(LVItems,"`am)(^.*?$)",_,!Pos?(Pos:=1):Pos+StrLen(_)),mCnt:=A_Index-1,Item[mCnt]:=_1 | |
Loop % mCnt { | |
SendMessage, 0x102c, A_Index-1, 0x2000, % cN, % wN | |
ChkItems.=(ErrorLevel ? Item[A_Index-1] "`n" : "") | |
} | |
Return ChkItems | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment