well yes you could but why add that extra step into your script? it's less efficient to add in that selection change for EVERY vertex e.g.if you wanted to loop through the verts:
string $obj = "myObject";
int $numbVerts[] = `polyEvaluate -v $obj`;
int $i = 0;
for($i; $i < $numbVerts[0]; $i++)
{
float $pos[] = `xform -q -ws -t ($obj + ".vtx["+$i+"]")`;
print($obj + ".vtx["+$i+"] " + $pos[0] + " " + $pos[1] + " " + $pos[2] + "\n");
}
there's no need to change selection and thus no need to store the users current select to change back to at the end.
Alan
Technical Director - Framestore
Currently working on: Your Highness
IMDB