Skip to content

Instantly share code, notes, and snippets.

@whaison
Created November 25, 2015 09:53
Show Gist options
  • Save whaison/e0675ba6ec6d423bcb1e to your computer and use it in GitHub Desktop.
Save whaison/e0675ba6ec6d423bcb1e to your computer and use it in GitHub Desktop.
melでテキスト書き込むスクリプト
string $list = "";
string $str[]={"a","b","c","d" };
for($val in $str)
{
$list+=($val+"\n");
}
print $list;//ここはチェック用に表示してるだけ
//ここから書き込みスクリプト。
//"C:/onogu2/test2.mel"が書き込むファイルの場所と名前。ファイルは存在しなければ新規に作成される。拡張子は好きにつけられる
//$exampleFileName = "C:/onogu2/test2.txt";
$exampleFileName = "/Share/design3dtoolkit/jsx_mel/UVanimation/test.txt";
$fileId=`fopen $exampleFileName "w"`;
$tmp="";
for ($val2 in $str);
{
fprint $fileId $list;
}
fclose $fileId;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment