Insert Line Into Text File - Symantec WISESCRIPT EDITOR 7.0 SP2 - FOR NS V1.0 Manual

Hide thumbs Also See for WISESCRIPT EDITOR 7.0 SP2 - FOR NS V1.0:
Table of Contents

Advertisement

Insert Line Into Text File

WiseScript Editor Reference
them with colleagues. They typically contain just a few lines of code, such as calling an
.EXE or displaying a particular dialog box. Include scripts can be any size with the
limitation that the calling script plus include scripts cannot be more than 32,000 lines.
Include scripts are displayed in tabs at the bottom of the script window.
To make an include script, create a new file and select Blank Script. Otherwise the
include script contains the default script, which is designed to perform an installation.
The combined script would then have two wizard loops, two of every dialog box, and so
on. Only the script is inserted into the calling script.
To complete the dialog box
Pathname
Specify the path of the script. It should be a .WSE file on your computer, not the
destination computer. Because the main script and include scripts are combined
during compile, not run time, do not use a run-time variable in Pathname. You can,
however, use a compiler variable.
Example of a line in the script that includes a script:
Include Script C:\Scripts\OpensWord.wse
Example of what a short include script might look like:
Execute %PROGRAM_FILES%\winword.exe
This action edits a text file on the destination computer. Use it to edit configuration files
that cannot be edited by Edit INI File, Add Device to System.ini, Add Command to
Config.sys, or Add Command to Autoexec.bat.
You can insert a new line at a particular line number, or you can search for text and
insert a new line before, after, or in place of the line where the text was found. Either
complete the Line Number field or the Search for Existing Text section. Do not
complete both because you can only do one or the other.
To complete the dialog box
File to Edit
Specify the path of the text file to edit (example: %SYS32%\File.txt).
Text to Insert
Enter the text to add to the file. If the line refers to a directory or file, start the path
with a variable (example: %MAINDIR%\Application.exe).
Line Number
Enter the line number at which to insert the new text. Enter 0 to append to the end
of the file. Information in the Search for Existing Text area overrides any line
number that is specified here unless the text is not found.
Search for Text
Enter the text to search for. If more than one line in the file matches, only the first is
edited.
Comment Text
Enter comment to insert at the beginning of the found line. When replacing an
existing line, use this to leave the existing line in place but inactive. Set Insert
73

Advertisement

Table of Contents
loading

Table of Contents