MEL YボタンクリックでY座標表示 Y MOVEボタンクリックで入力座標移動

global proc Y()
{

float $bb = `textField -query -text BB`;
move -a -y $bb ;
};
global proc YYY()
{
float $val;

string $qq = `ls -sl`;
string $pos[] = `filterExpand -sm 31 $qq`;
int $i = 0;
for($p in $pos)
{
$pv = `pointPosition $p`;
$val[$i] = $pv[1];
}
textField -e -tx ($val[0]) BB;
};

window -width 120 -height 50 -title "Y" -rtf 1;

columnLayout -adjustableColumn true;

separator;

rowColumnLayout -numberOfColumns 2 -columnAttach 1 "right" 0 -columnWidth 1 20 -columnWidth 2 100;
button -label "Y" -command "YYY" -width 20 ;
textField -width 100 -editable true BB;
setParent..;
separator;

gridLayout -numberOfColumns 1 -cellWidth 120 -cellHeight 20;
button -label "Y MOVE" -command "Y";
setParent..;

showWindow;