PRODUCT |

|

|
|
|

|
|
|
|
|
|
|
|
|
FAQ |
|
|

|
|
|
|
|
|
|
|
|
|
LEARN SCRIPTING |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SAMPLE SCRIPTS |
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HELP / DOCUMENTATION |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Sample Script - SS_AllSamples
( Some of the sample scripts may not be reproduced correctly in html because those scripts, especially web-related scripts, have html tags such as < tr > in their code.
For an accurate, copy-and-paste'able text version of this script, see SS_AllSamples.txt . )
|
|
|
#####################################################################
# SCRIPT: SS_AllSamples
#
# This script installs all sample scripts, provided in a release, in directory C:/Scripts.
#
# There are no input arguments (FVA - Forward Variable Assignment) to this script.
#
# This script can be stored and edited as necessary, in a text file
# called SS_AllSamples.txt in directory C:/Scripts. The script can be called as
#
# script SS_AllSamples.txt
#
#
#####################################################################
# Get a list of all help page titles
var str title, titles, page, file, type
help > $titles
# Process one title at a time
while ($titles <> "")
do
# Get the next title
lex -e "1" $titles > $title
# The title has a name, type and descriptiong, separated by tabs.
# If the type is "Sample Script", it is a title of a sample script.
# We are only interested in these titles.
set $type = $title
stex "[^\t^2" $type > null
stex "^\t^1]" $type > null
if ( $type == "Sample Script" )
do
# Yes, this is a title for a sample script. Get the help page for this title.
wex "1" $title > $title
help $title > $page
# The page contains help headers, followed by the code for the sample script.
# The code for the script begins with the first #, so we will strip off everything (and excluding) the first #.
stex "]^#^" $page > null
# The code for this sample script is in $page. The name of the script is in $title. We will create a file
# in C:/Scripts by the name $title.txt .
set $file = "C:/Scripts/"+$title+".txt"
# Write the file.
echo $page > { echo $file }
done
endif
done
|
|
|
© 2008-2010, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterScripting.com, FVA (Forward Variable Assignment) are trademarks of biterScripting.com. Is it biterScripting-compatible ? is a service mark of biterScripting.com.
Explorer, Unix, Windows are trademarks, service marks or other forms of intellectual property of their respective owners.
|
|