Here's the function for checking a single item, or just use the batch checking in the code above.
Function IsItemSelected(ListView,Index) ; ListView: A ListBox gadget ; Index: Item in the ListBox to check hWND=QueryObject(ListView,1) CItem.Item=New Item Pointer=Int(CItem)+20 CItem\Index=t CItem\SubIndex=0 CItem\Mask=8 CItem\StateMask=2 SendMessage hWND,$1000+5,0,Pointer State=CItem\State Delete CItem Return State End Function