TextStream ÆÄÀÏ¿¡¼ ÇöÀç ¹®ÀÚ°¡ ÀÖ´Â ¼öÆò À§Ä¡ ¹øÈ£¸¦ ¹ÝȯÇÑ´Ù.
°³Ã¼´Â Ç×»ó TextStream °³Ã¼ÀÇ À̸§ÀÌ´Ù.
ÀбâÀü¿ë ¼Ó¼ºÀÌ´Ù.
TextStream ÆÄÀÏ¿¡¼ ÇöÀç ¹®ÀÚ°¡ ÀÖ´Â À§Ä¡ÀÇ ¿ ¹øÈ£¸¦, ´Ù½Ã ¸»Çؼ ¼öÆòÀ§Ä¡¸¦ ±ÛÀÚ¼ö·Î ¹ÝȯÇÑ´Ù.
ÁٹٲÞÇÏ¸é ´ÙÀ½ ÁÙ Á¦ÀÏ ÁÂÃøÀ§Ä¡·Î À̵¿ÇϹǷÎ, ÁÙ ¹Ù²Þ ¹®ÀÚ¸¦ ¾´ ´ÙÀ½ ´Ù¸¥ ¹®ÀÚ´Â ¾²Áö ¾Ê¾Ò´Ù¸é ColumnÀº 1ÀÌ µÇ¾î Ãʱâȵȸç, Line °ªÀº 1 Áõ°¡µÈ´Ù.
Line°ú ColumnÀÇ Á¶ÇÕÀ¸·Î ¹®ÀÚ¿ ÈÀÏ¿¡¼ À§Ä¡¸¦ ¾Ë ¼ö ÀÖ´Ù.
óÀ½ ÆÄÀÏÀ» ¿¬ ´ÙÀ½ ¾Æ¹« ³»¿ëµµ ¾²Áö ¾Ê¾Ò´Ù¸é Line°ú ColumnÀº °¢°¢ 1ÀÌ´Ù.
<SCRIPT language=JScript> function ColumnTest(filePath){ var fso,fileObj,tmp; var ForReading=1,ForWriting=2; fso=new ActiveXObject('Scripting.FileSystemObject'); fileObj=fso.OpenTextFile(filePath,ForWriting,true); fileObj.Write('¾È³çÇϼ¼¿ä'); fileObj.Close(); fileObj=fso.OpenTextFile(filePath,ForReading); tmp=fileObj.ReadLine(); return('fileObj.Column='+fileObj.Column); } </SCRIPT> <DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showjs.innerHTML=ColumnTest('C:\\JsTest\\ColTestFile.txt')"> <SPAN class=ie>JScript</SPAN> <SPAN class=property>Column</SPAN> ¿¹Á¦</DIV>
<SCRIPT language=VBScript> Function ColumnTestvb(filePath) Dim fso,fileObj,str Const ForReading=1,ForWriting=2 Set fso=CreateObject("Scripting.FileSystemObject") Set fileObj=fso.OpenTextFile(filePath,ForWriting,true) fileObj.Write "¾È³çÇϼ¼¿ä" fileObj.Close Set fileObj=fso.OpenTextFile(filePath,ForReading) str=fileObj.ReadLine ColumnTestvb=str&"<BR>fileObj.Column="&fileObj.Column End Function </SCRIPT> <DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV> <DIV class=show onClick="showvb.innerHTML=ColumnTestvb('C:\\JsTest\\ColTestFile.txt')"> <SPAN class=ie>VBScript</SPAN> <SPAN class=property>Column</SPAN> ¿¹Á¦</DIV>