This should work, you can add anything you want in the case...change the value, select the objects, etc...
select -clear;
string $obj[] = ls -g;
for ($sObj in $obj){
int $opp = getAttr ($sObj + ".opposite");
switch ($opp)
{
case 1:
select -add $sObj;
//setAttr (($sObj + ".opposite") 1; /// if you wanna change the value///
break;
case 0:
break;
}
}
enjoy
Sylvain Berger
R&D / compositing
Alpha Vision