I'm using macro scheduler Pro 7.4
This is a newbie question so I'm posting it here. when you use the ReadLn function how many bytes does it grab? The reason I ask is because if I do a read line for example:
Let>k=1
ReadLn>%SCRIPT_DIR%\test.txt,k,line
MessageModal>%line%
I'm going to get the entire paragraph unless there is a empty line separating one paragraph from another. I have no problem with it I'm just trying to verify the function.
Read Line
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It reads one line. The number of bytes will depend on the size of the line. To clarify a line is delimited by a newline character. In DOS this is CRLF. If you look in notepad with wordwrap OFF then you see a list of lines. ReadLn given a number will retrieve one of these full lines. Each one is a different size in bytes.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Um. I never thought I'd have to explain what a line in a text file is! So I'm struggling.
Let's say you open a text file in Notepad and it looks like this:
Hello World
Apples and Oranges
The End
That has THREE lines. Line 2 is 18 chars. If it was ansi text it would be 18 bytes.
If you use ReadLn and specify 2 for the line to read it will read in "Apples and Oranges".
Let's say you open a text file in Notepad and it looks like this:
Hello World
Apples and Oranges
The End
That has THREE lines. Line 2 is 18 chars. If it was ansi text it would be 18 bytes.
If you use ReadLn and specify 2 for the line to read it will read in "Apples and Oranges".
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
marcus as I said in my first explanation. I have a paragraph with no CR or LF in about 40 lines of text. When I used ReadLn it reads the entire paragraph. But based on what u have explained, that is normal function. So as I understand it. because you have 40 lines of data (with no Delmeter separations) it grabs the entire paragraph. I hope I'm explaining this right.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Open your file in notepad and make sure word wrap is OFF. You should see this paragraph all on one line. Each line appearing in notepad with word wrap off would be as each line read by ReadLn.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact: