thx for your help enhzflep,
this is working now
for ($i = 0; $i <= 16; ++$i)
{
$object_a = "schalB_" + $i;
$object_b = "locator1" ;
eval select -add $object_b;
//commando
eval("connectAttr -f locator1.schalB schalB_" + $i + ".rotateZ;");
}
everything starts and ends in the right place at the right time.