Created
November 25, 2015 09:53
-
-
Save whaison/e0675ba6ec6d423bcb1e to your computer and use it in GitHub Desktop.
melでテキスト書き込むスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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