Go to Text Reader Line

Verb: textReaderGoTo

Moves the reader to the indicated line, returning if the action completes successfully.

Syntax

textReaderGoTo --linenumber(Numeric) --file(TextFileReader) (Boolean)=value

Inputs

Script Designer Required AcceptedTypes Description
--linenumber Line Number Required Number Index value (position) of the line within the text where reading should begin.
--file Text reader Required Text File Reader Variable that contains the text file in which the line for reader movement is defined.

Outputs

Script Designer AcceptedTypes Description
value Line number Boolean Value indicating the success (True) or failure (False) of the text reader line movement.

Example

Moves the reader to the indicated line using the Go to Text Reader Line command. Previously used the command Open Text File for Reading to open the text for reading.

defVar --name textFileReader --type TextFileReader
defVar --name success --type Boolean
// Open the file informed for reading.
// Download the following file to execute the command.
openTextReader --share "Read" --path "binaryFile.txt" --encoding "Default" textFileReader=value
// Move reader to start line "2" within open text file for reading.
textReaderGoTo --linenumber 2 --file ${textFileReader} success=value
logMessage --message "${success}" --type "Info"
// The example returns the success of the move action.

Download File


For the correct operation of the script above, it is necessary to download the file and enter its path in the "Path" parameter of the "Open Text File for Reading" command.

Remarks

You must first open a text for reading with the command Open Text File for Reading.

In case the indicated line in Line Number cannot be found, the return of Line number is False and the reader goes to the default position 1.

See Also

  • Binary Read Int
  • Close Binary File
  • Close Text File
  • Get Binary File Boolean
  • Get Binary File Characters
  • Get Binary File Text
  • Get Date and Time in Binary
  • Get Table from a Text File
  • Get Text File Line
  • Move Index in Binary File
  • Open Binary File for Reading
  • Open Binary File for Writing
  • Open Text File for Reading
  • Open Text File for Writing
  • Read Binary File Decimal
  • Read Binary File Time Span
  • Read Delimited Line of Text File
  • Read Text to the End
  • Save Changes to Binary File
  • Save Changes to Text File
  • Write Boolean in Binary File
  • Write Date Time in Binary File
  • Write Decimal to Binary File
  • Write Delimited Text Line to Text File
  • Write Delimited Texts in Text File
  • Write in Text File
  • Write Integer to Binary File
  • Write Text in Binary File
  • Write Text Line to Text File
  • Write Time Span in Binary File