Yes nice idea except it dont work. The real problem is not in what you ask thats trivial. Problem is that scaling doenst actually work the way you think, unless your box modeling, with very bad topography in which case its easy enough. See the problem is where to put the scale center? What happens if the loop is corked? They often are you know, not straight but curved in some way.
There is a secondary problem, if the loops cross they will move the crossing vertex 2 times easy to fix but totally unnecessary work.
You may find moving in normal direction does much the same thing, it just has a much better local sense than scale. So the real problem is how to place the pivot of the scale so it makes sense.
Anyway:
Dont use the mel procedure findEdgeloop to find the edge loop, if your using maya 2008 or higher then theres actually a command that accomplishes the edge loop selection, its also MUCH MUCH more speedier then iterating in mel. So you can just take any one edge in selection expand it to edge loop.
$oneLoop = `polySelectSp -q -loop $edge`;
Something to nude you one the way for now. yes you need to COMPUTE the placement of the pivot!
{
$selection = `ls -sl`;
$size=size($selection);
while($size>0){
$sel=`ls -sl`;
// the problem is that unlike the tool mel
// doesnt actually auto compute the center
// you need to do it here.
$sel=`polySelectSp -q -loop $sel[0]`;
scale -cp -r 2 2 2 $sel;
select -d $sel;
$size=size(`ls -sl`);
print $sel;
}
select $selection;
}
Second dont think, GUI item. Its essentially the wrong way to think about maya development. Think, nodes. Now 3 nodes come in mind: polyMoveVertex, blendShape and trasformGeometry.
See the act of making a node to do it, means it works with exisisting construction history and you get the GUI for free! Not just that you get a gui you can return to later.
Anyway i would do this for you to show that it doesn't actually work very well in most situations but haven't got the time.
PS: dont mine the net for a script that kind of does almost what you want. You will go wrong so many ways because your dining a history of ways that ,may not be current OR never were good to begin with.
PPS: if you make a tool and it dont create a node. Your doing something wrong!