Hey guys
i have made a quick script that exports object postions etc to a .txt file but for some reason my .txt file won't open in word pad. I think it doesn't make a n or new line the corect way.
Here is my script
string $file;
$file = fileDialog
;
$exampleFileName = ($file) ;
$fileId=fopen $exampleFileName "w+"
;
string $sel[] = ls -sl
;
int $i;
for($i=0; $i < size($sel); ++$i)
{
float $x[] = getAttr ($sel[$i]).translateX
;
fprint ($fileId, $x[$i] + " ");
float $y[] = getAttr ($sel[$i]).translateY
;
fprint ($fileId, $y[$i] + " ");
float $sx[] = getAttr ($sel[$i]).scaleX
;
fprint ($fileId, $sx[$i] + " ");
float $sy[] = getAttr ($sel[$i]).scaleY
;
fprint ($fileId, $sy[$i] + " ");
string $gimp;
$gimp = substring $sel[$i] 6 10
;
print $gimp;
string $phat;
$phat = substring $sel[$i] 1 5
;
print $phat;
string $list[] = listConnections ( $phat + "Shape" + $gimp)
;
print $list[0];
$gimp = (substring $list[0] 6 6
);
fprint ($fileId, $gimp + " n" );
}
fclose $fileId;
;
Can anyone help out??
Cheers Ben