Announcement

Collapse
No announcement yet.

Reading Specific Lines from a Text File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reading Specific Lines from a Text File

    Reading Specific Lines from a Text File

    Reading Specific Lines from a Text File

    Document ID: IR10025
    The information in this article applies to:
    • AutoPlay Media Studio 5.0 Professional Edition

    SUMMARY

    This article describes how to reboot the user's system.

    DISCUSSION

    To retrieve specific lines from a text file in AutoPlay Media Studio 5.0, use the ReadToTable action.

    As an example, we will read the file C:\test.txt into a table variable, and output the lines 4 through 10 to a paragraph object:

    Insert the following code into an event in your application:

    beginning_line = 4;

    end_line = 10;

    tabText = TextFile.ReadToTable("c:\\test.txt");

    strLinesOfText = ""; line = beginning_line;



    while line < (end_line + 1) do

    strLinesOfText = strLinesOfText .. "\r\n" .. "Line " .. line .. ": " .. tabText[line] .. "\r\n"; line = line + 1;

    end



    Paragraph.SetText("Paragraph1", strLinesOfText);


    MORE INFORMATION

    For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

    • Program Reference | Actions | TextFile | TextFile.ReadToTable

    KEYWORDS: AutoPlay Media Studio 5.0, Actions, Text, File, Table, String, Read


    Last reviewed: September 26, 2003
    Copyright © 2003 Indigo Rose Corporation. All rights reserved.
Working...
X