解决方案 »

  1.   

    程序里 打开文件后,就直接关闭了,没做其他操作,如何知道没被打开?
    如果希望是用notepad打开的话,不是用 FSO,用 WSH的Shell去启动notepad进程来打开文件
      

  2.   

    function CreateFile(Testing)
    {
       var fso, tf;
       fso = new ActiveXObject("Scripting.FileSystemObject");
       tf = fso.CreateTextFile("c:\\testfile.txt", true);
       // 写一行,并且带有新行字符。
       tf.WriteLine(Testing) ;
       // 向文件写三个新行字符。 
       tf.WriteBlankLines(3) ;
       // 写一行。
       tf.Write ("This is a test.");
       tf.Close();
    }