viewpoint-particle

Author Topic: 1591: Fleread: line to long  (Read 385 times)

juergenk

  • Newbie
  • *
  • Posts: 10
1591: Fleread: line to long
« on: June 02, 2022, 06:46:06 am »
Hello guys,

i will read an very long line in Files how i can do this ?

greetings
juergen

filename = "E:\a\Projekt GL NEU\FB\bed.htm"
arrFile = ArrayFileGet (filename , "" , 0)
linecount = ArrInfo(arrFile,6)
For x = 0 to linecount-1
  line =  arrFile

  Pause("Line: ":x, line)
Next

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: 1591: Fleread: line to long
« Reply #1 on: June 02, 2022, 06:54:35 am »
The solution depends on what exactly the "this" is you are trying to perform. If you are referring to parsing out the contents of a file, WinBatch offers several ways of performing that task including loading the file into a binary buffer. If you are referring to displaying the contents of a portion of a file, WinBatch offers several ways of performing that task too. For example, you could consider creating a WIL dialog.

Also, you can control the maximum file line length with IntControl 65. Check it out in the Consolidated WIL Help file on your system or by going to the WinBatch Documentation Website.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1832
    • Data & Stuff Inc.
Re: 1591: Fleread: line to long
« Reply #2 on: June 02, 2022, 07:04:12 am »
intcontrol 65?

Jim

stanl

  • Pundit
  • *****
  • Posts: 1656
Re: 1591: Fleread: line to long
« Reply #3 on: June 02, 2022, 10:48:51 am »
Maybe off topic. But why read an .htm file line by line. There are parsers and components that might produce results [not specified in original post]... conducive to a goal.

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: 1591: Fleread: line to long
« Reply #5 on: June 03, 2022, 01:32:01 pm »
At the risk of speaking the obvious, IntControl 65 documentation only mentions the FileRead function but the same setting is used by ArrayFileGet. A new IntControl 65 setting only takes effect for files opened with FileOpen or ArrayFileGet after the call to IntControl 65.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade