ファイル(選択範囲)の仮保存
ナビゲーションに移動
検索に移動
- 選択範囲を“編集中のファイル名"+数字13桁+".TMP"というファイル名で保存します。
- 数字部分は、1970 年 1 月 1 日午前 00:00:00 以降のミリ秒です。
// saveAstemporary.js // 2013/01/19 var s = Editor.ActiveDocument.Selection.Text; if ( s.length == 0 ) { Quit() ;} var filename = document.FullName; Editor.NewFile(); var newdoc = Editor.Documents.Item( Editor.Documents.Count-1 ); newdoc.Write( s ); newdoc.save( filename + tail() ); newdoc.saved = true; newdoc.close(); function tail() { d = new Date; return "." + d.getTime() + ".TMP"; }
スポンサーリンク