![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-13 22:54 |
47,812 topics / 349,916 posts / today 0 new / 48,268 members |
| 论坛回收站 » VBS seeking help |
| Printable Version 2,363 / 5 |
| Floor1 wangsky100 | Posted 2010-10-02 20:42 |
| 新手上路 Posts 5 Credits 5 | |
|
```vbnet
Const ForReading = 1 'Set the text opening mode to read Const ForWriting = 2 'Set the text opening mode to write Const ForAppending = 8 'Set the text opening mode to append Const InFile = "a.txt" 'Set the text to open Dim i, Sum Dim StrLine, OutStr1, OutStr2 i = 1: Sum = 0 'On Error Resume Next Set objFSO = CreateObject("Scripting.FileSystemObject") 'Reference the FSO object, which is needed for reading and writing files Set objFile = objFSO.OpenTextFile(InFile, ForReading) 'Open InFile in read mode Do Until objFile.AtEndOfStream StrLine = objFile.ReadLine 'Read a line If Len(StrLine) Then 'If it's not an empty line 'MsgBox Mid(StrLine, Len(StrLine) - 58, 1) Test (commented out). If Mid(StrLine, Len(StrLine) - 58, 1) = "1" Then 'Should the count from the end be correct? OutStr1 = OutStr1 & StrLine & vbCrLf Else OutStr2 = OutStr2 & StrLine & vbCrLf End If End If Loop objFile.Close 'Close the file object Set objFile = objFSO.OpenTextFile("a1.txt", ForWriting, True) objFile.Write OutStr1 objFile.Close Set objFile = objFSO.OpenTextFile("a2.txt", ForWriting, True) objFile.Write OutStr2 objFile.Close Set objFile = Nothing Set objFSO = Nothing [ Last edited by wangsky100 on 2010-10-2 at 20:43 ] ``` |
|
| Floor2 wangsky100 | Posted 2010-10-02 20:46 |
| 新手上路 Posts 5 Credits 5 | |
|
Can it be changed to
1: Copy the second line of the text to a1.txt 2: Copy all content after Introduction: to a2.txt [ Last edited by wangsky100 on 2010-10-2 at 20:48 ] |
|
| Floor3 wangsky100 | Posted 2010-10-02 20:50 |
| 新手上路 Posts 5 Credits 5 | |
|
The content on the top of the building is the website's essence index content. Author: slore. Please help solve it if you can, thanks a lot!!!
|
|
| Floor4 wangsky100 | Posted 2010-10-02 20:51 |
| 新手上路 Posts 5 Credits 5 | |
|
Director: Director
Starring: Seann William Scott, Chow Yun-fat, Jaime King Genre: Action Region: Europe and America region Language: Classification Year: Release Length: Introduction: In this film, Chow Yun-fat plays a nameless mysterious monk. He comes from Tibet, China. For 60 years, he has been shouldering an important task - protecting a mysterious ancient scripture scroll, which is a martial arts secret book inscribed with ancient Chinese scriptures, containing extremely powerful strange power. As long as you get this power, you can be invincible in the world. Countless people with evil intentions have either once or are currently coveting it. In order not to let the scroll fall into the hands of the evil and do harm to the world, the nameless martial artist walks away and his footprints spread all over the north and south of the Yangtze River. brbr Now the nameless martial artist feels that the years are passing, so he actively looks for an excellent apprentice and wants to pass on the task of protecting the scroll. Coincidentally, a street gangster Carl (Seann William Scott) who does nothing all day long actually saves the nameless martial artist from a group of gangsters by chance. Maybe it's really the arrangement of fate in the dark. The martial artist firmly believes that this little rascal Carl who looks grinning and completely has no sense of responsibility is his best apprentice, so he decides to teach Carl all his unfathomable legendary martial arts. But Carl obviously scorns this "master" who falls from the sky. Before Carl awakens to his destined mission in this life, the nameless martial artist must lead him, and with the help of a beautiful, sexy and a little sense of justice female thief (Jemie King), join hands to fight against those who try to forcefully take and grab the mysterious scripture scroll, Can become 1: Copy the second line of the text to a1.txt 2: Copy all the content after Introduction: to a2.txt [ Last edited by wangsky100 on 2010-10-2 at 21:05 ] |
|
| Floor5 wangsky100 | Posted 2010-10-02 20:53 |
| 新手上路 Posts 5 Credits 5 | |
|
Const InFile = "a.txt" 'Set the text to open
It is best that the red part is not restricted to the text name, because each text name is different. If possible, it is best (Text such as a.txt, b.txt, 123.txt, movie.txt........) [ Last edited by wangsky100 on 2010-10-2 at 20:56 ] |
|
| Floor6 HAT | Posted 2010-10-03 13:03 |
| 版主 Posts 5,017 Credits 9,023 | |
|
It is recommended to read the following posts:
{1415}The Wisdom of Asking Questions {7326}Must-read for Forum Newcomers, Basic Code of Conduct for Everyone {22703}Please Don't Be an Impatient Person {27314}Negative Example: A Small Collection of "Wonderful" Titles in This Forum {32667}Anger: Those People Who Can't Even Write a Clear Title, Wake Up! {32825}Severe Rectification of Poor Posts in This Section |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |