Bacanya pake script seperti ini... ... li_fl = fileopen(is_docname,LineMode!, Read!, Shared!) li_ret = fileread(li_fl,ls_data) DO WHILE li_ret <> -100 ...
Thanks, Avi. ----- Original Message ----- From: Parwanto @[EMAIL PROTECTED] To: [email protected] Sent: Wednesday, January 03, 2007 8:48 AM Subject: [indopb] Open, Read, Write Text File Dear indopb-er... Saya ingin membaca sebuat text file, namun karena panjangnya text tersebut, jadinya saya ingin baca perbaris. saya coba dengan LineMode untuk opsi Bacanya... eh taunya kebaca cuma sebaris doang-an... berikut scripting nya \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // buat baca file per-garis integer li_FileNum, loops, i long flen, bytes_read, new_pos string b, tot_b // Cari Panjang File flen = FileLength("D:\x.txt") // Buka File li_FileNum = FileOpen("D:\x.txt", & StreamMode!, Read!, LockRead!) // Menentukan Be rapa kali memang funsi FileRead IF flen > 32767 THEN IF Mod(flen, 32767) = 0 THEN loops = flen/32767 ELSE loops = (flen/32767) + 1 END IF ELSE loops = 1 END IF // Baca File-nya new_pos = 1 messagebox('li_FileNum', li_FileNum) messagebox(string(flen),loops) do while (FileRead(li_FileNum, b))<>-100 //messagebox('Perhatian',string(FileRead(li_FileNum, b))) tot_b = tot_b + b st_1.text = b //messagebox('Perhatian', b) loop FileClose(li_FileNum) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ nah dalam hal ini, saya bingung... bagamana caranya agar semua baris terbaca. looping sambai baris terakhir... Send instant messages to your online friends http://uk.messenger.yahoo.com =================================================== PT. BANK ARTHA GRAHA INTERNASIONAL TBK. DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
