Last active
December 19, 2015 13:58
-
-
Save hmasato/5965720 to your computer and use it in GitHub Desktop.
[Softimage, Win] _sendToNotepad.js
This file contains hidden or 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
| function _notepad(str) | |
| { | |
| var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
| var wsh = new ActiveXObject("WScript.Shell"); | |
| var dir = wsh.ExpandEnvironmentStrings("%temp%"); | |
| var sn = ActiveProject.ActiveScene.Parameters("Name").Value; | |
| var fn = dir + "\\" + sn + ".txt"; | |
| var f = fso.CreateTextFile(fn, true, false); | |
| if(f==null) return; | |
| f.WriteLine(str); | |
| f.Close(); | |
| wsh.Run(fn); | |
| // wsh.Run("cmd.exe /c clip < " + fn, 0, true); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment