Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active December 12, 2015 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TLMcode/4757894 to your computer and use it in GitHub Desktop.
Save TLMcode/4757894 to your computer and use it in GitHub Desktop.
Returns a list of checked items from a standard ListView Control
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