Networking Principles Essay, Research Paper
Dial-Up Scripting Command Language
For Dial-Up Networking Scripting Support
Copyright (c) 1995 Microsoft Corp.
Table of Contents
1.0 Overview
2.0 Basic Structure of a Script
3.0 Variables
3.1 System Variables
4.0 String Literals
5.0 Expressions
6.0 Comments
7.0 Keywords
8.0 Commands
9.0 Reserved Words
1.0 Overview
Many Internet service providers and online services require you to manually enter information, such as your user name and password, to establish a connection. With Scripting support for Dial-Up Networking, you can write a script to automate this process.
A script is a text file that contains a series of commands, parameters, and expressions required by your Internet service provider or online service to establish the connection and use the service. You can use any text editor, such as Microsoft Notepad, to create a script file. Once you’ve created your script file, you can then assign it to a specific Dial-Up Networking connection by running the Dial-Up Scripting Tool.
2.0 Basic Structure of a Script
A command is the basic instruction that a script file contains. Some commands require parameters that further define what the command should do. An expression is a combination of operators and arguments that create a result. Expressions can be used as values in any command. Examples of expressions include arithmetic, relational comparisons, and string concatenations.
The basic form of a script for Dial-Up Networking follows:
;
; A comment begins with a semi-colon and extends to
; the end of the line.
;
proc main
; A script can have any number of variables
; and commands
variable declarations
command block
endproc
A script must have a main procedure, specified by the proc keyword, and a matching endproc keyword, indicating the end of the procedure.
You must declare variables before you add commands. The first command in the main procedure is executed, and then any subsequent commands are executed in the order they appear in the script. The script ends when the end of the main procedure is reached.
3.0 Variables
Scripts may contain variables. Variable names must begin with a letter or an underscore (’_'), and may contain any sequence of upper- or lower-case letters, digits, and underscores. You cannot use a reserved word as a variable name. For more information, see the list of reserved words at the end of this document.
You must declare variables before you use them. When you declare a variable, you must also define its type. A variable of a certain type may only contain values of that same type. The following three types of variables are supported:
Type Description
integer A negative or positive number, such as 7, -12, or 5698.
string A series of characters enclosed in double-quotes; for example, “Hello world!” or “Enter password:”.
boolean A logical boolean value of TRUE or FALSE.
Variables are assigned values using the following assignment statement:
variable = expression
The variable gets the evaluated expression.
Examples:
integer count = 5
integer timeout = (4 * 3)
integer i
boolean bDone = FALSE
string szIP = (getip 2)
set ipaddr szIP
3.1 System Variables
System variables are set by scripting commands or are determined by the information your enter when you set up a Dial-Up Networking connection. System variables are read-only, which means they cannot be changed within the script. The system variables are:
Name Type Description
$USERID String The user identification for the current connection. This variable is
the value of the user name specified in the Dial-Up Networking
Connect To dialog box.
$PASSWORD String The password for the current connection. This variable is the
value of the user name specified in the Dial-Up Networking
Connect To dialog box.
$SUCCESS Boolean This variable is set by certain commands to indicate whether or not the command succeeded. A script can make
decisions based upon the value of this variable.
$FAILURE Boolean This variable is set by certain commands to indicate
whether or not the command failed. A script can make decisions
based upon the value of this variable.
These variables may be used wherever an expression of a similar type is used. For example,
transmit $USERID
is a valid command because $USERID is a variable of type string.
4.0 String Literals
Scripting for Dial-Up Networking supports escape sequences and caret translations, as described below.
String Literal Description
^char Caret translation
If char is a value between ‘@’ and ‘_’, the character sequence is translated into a single-byte value between 0 and 31. For example, ^M is converted to a carriage return.
If char is a value between a and z, the character sequence is translated into a single-byte value between 1 and 26.
If char is any other value, the character sequence is not specially treated.
*cr* Carriage return
*lf* Linefeed
” Double-quote
^ Single caret
* Single ‘*’
\ Backslash
Examples:
transmit “^M”
transmit “Joe^M”
transmit “*cr**lf*”
waitfor “*cr**lf*”
5.0 Expressions
An expression is a combination of operators and arguments that evaluates to a result. Expressions can be used as values in any command.
An expression can combine any variable, or integer, string, or boolean values with any of the unary and binary operators in the following tables. All unary operators take the highest precedence. The precedence of binary operators is indicated by their position in the table.
The unary operators are:
Operator Type of Operation
- Unary minus
! One’s complement
The binary operators are listed in the following table in their order of precedence. Operators with higher precedence are listed first:
Operators Type of Operation Type Restrictions
* / Multiplicative Integers
+ – Additive integers Strings (+ only)
* * *= *= Relational Integers
== != Equality Integers, strings, booleans
and Logical AND Booleans
or Logical OR Booleans
Examples:
count = 3 + 5 * 40
transmit “Hello” + ” there”
delay 24 / (7 – 1)
6.0 Comments
All text on a line following a semicolon is ignored.
Examples:
; this is a comment
transmit “hello” ; transmit the string “hello”
7.0 Keywords
Keywords specify the structure of the script. Unlike commands, they do not perform an action. The keywords are listed below.
proc name
Indicates the beginning of a procedure. All scripts must have a main procedure (proc main). Script execution starts at the main procedure and terminates at the end of the main procedure.
endproc
Indicates the end of a procedure. When the script is executed to the endproc statement for the main procedure, Dial-Up Networking will start PPP or SLIP.
integer name [ = value ]
Declares a variable of type integer. You can use any numerical expression or variable to initialize the variable.
string name [ = value ]
Declares a variable of type string. You can use any string literal or variable to initialize the variable.
boolean name [ = value ]
Declares a variable of type boolean. You can use any boolean expression or variable to initialize the variable.
8.0 Commands
All commands are reserved words, which means you cannot declare variables that have the same names as the commands. The commands are listed below:
delay nSeconds
Pauses for the number of seconds specified by nSeconds before executing the next command in the script.
Examples:
delay 2 ; pauses for 2 seconds
delay x * 3 ; pauses for x * 3 seconds
getip value
Waits for an IP address to be received from the remote computer. If your Internet service provider returns several IP addresses in a string, use the value parameter to specify which IP address the script should use.
Examples:
; get the second IP address
set ipaddr getip 2
; assign the first received IP address to a variable
szAddress = getip
goto label
Jumps to the location in the script specified by label and continues executing the commands following it.
Example:
waitfor “Prompt*” until 10
if !$SUCCESS then
goto BailOut ; jumps to BailOut and executes commands
; following it
endif
transmit “bbs^M”
goto End
BailOut:
transmit “^M”
halt
Stops the script. This command does not remove the terminal dialog window. You must click Continue to establish the connection. You cannot restart the script.
if condition then
commands
endif
Executes the series of commands if condition is TRUE.
Example:
if $USERID == “John” then
transmit “Johnny^M”
endif
label :
Specifies the place in the script to jump to. A label must be a unique name and follow the naming conventions of variables.
set port databits 5 | 6 | 7 | 8
Changes the number of bits in the bytes that are transmitted and received during the session. The number of bits can be between 5 and 8. If you do not include this command, Dial-Up Networking will use the properties settings specified for the connection.
Example:
set port databits 7
set port parity none | odd | even | mark | space
Changes the parity scheme for the port during the session. If you do not include this command, Dial-Up Networking will use the properties settings specified for the connection.
Example:
set port parity even
set port stopbits 1 | 2
Changes the number of stop bits for the port during the session. This number can be either 1 or 2. If you do not include this command, Dial-Up Networking uses the properties settings specified for the connection.
Example:
set port stopbits 2
set screen keyboard on | off
Enables or disables keyboard input in the scripting terminal window.
Example:
set screen keyboard on
set ipaddr string
Specifies the IP address of the workstation for the session. String must be in the form of an IP address.
Examples:
szIPAddress = “11.543.23.13″
set ipaddr szIPAddress
set ipaddr “11.543.23.13″
set ipaddr getip
transmit string [ , raw ]
Sends the characters specified by string to the remote computer.
The remote computer will recognize escape sequences and caret translations, unless you include the raw parameter with the command. The raw parameter is useful when transmitting $USERID and $PASSWORD system variables when the user name or password contains character sequences that, without the raw parameter, would be interpreted as caret or escape sequences.
Examples:
transmit “slip” + “^M”
transmit $USERID, raw
waitfor string [ , matchcase ] [ then label
{ , string [ , matchcase ] then label } ]
[ until time ]
Waits until your computer receives one or more of the specified strings from the remote computer. The string parameter is case-insensitive, unless you include the matchcase parameter.
If a matching string is received and the then label parameter is used, this command will jump to the place in the script file designated by label.
The optional until time parameter defines the maximum number of seconds that your computer will wait to receive the string before it execute the next command. Without this
parameter, your computer will wait forever.
If your computer receives one of the specified strings, the system variable $SUCCESS is set to TRUE. Otherwise, it is set to FALSE if the number of seconds specified by time elapses before the string is received.
Examples:
waitfor “Login:”
waitfor “Password?”, matchcase
waitfor “prompt*” until 10
waitfor
“Login:” then DoLogin,
“Password:” then DoPassword,
“BBS:” then DoBBS,
“Other:” then DoOther
until 10
while condition do
commands
endwhile
Executes the series of commands until condition is FALSE.
Example:
integer count = 0
while count * 4 do
transmit “^M”
waitfor “Login:” until 10
if $SUCCESS then
goto DoLogin
endif
count = count + 1
endwhile
…
9.0 Reserved Words
The following words are reserved and may not be used as variable names.
and boolean databits delay
do endif endproc endwhile
even FALSE getip goto
halt if integer ipaddr
keyboard mark matchcase none
odd off on or
parity port proc raw
screen set space stopbits
string then transmit TRUE
until waitfor while
Другие работы по теме:
Machiavelli Opinions Of A Perfect Princedom Essay
, Research Paper Niccolo Machiavelli?s work The Prince is a letter he wrote, while he was in exile to Lorenzo Medici. In his work he sought to establish a state capable of resisting foreign attack. His writings are concerned with the principles on which a state is founded, and how they are maintained. He describes the methods by which a prince can acquire and maintain political power.
College Admision Essay Research Paper Being accepted
College Admision Essay, Research Paper Being accepted into College would open up a lot of opportunities for my future. Ever since I was a child, I have been in awe about how computers operate. At the age of fifteen, I got a summer job at Fallon Clinic, doing computer repair and computer networking. Later I proceeded to build a computer out of spare parts, and from then on I have wanted to be a computer engineer.
100 Senses Essay Research Paper Told from
100 Senses Essay, Research Paper Told from the perspective of Olivia, the very Western and practical younger sister, this delightful tapestry is the result of Tan’s signature wise yet comical scripting. From the suburbs of modern-day Daly City to the mystical village of Changmian during the Taiping Rebellion, Tan creates high adventure by expertly weaving two distinct plots.
Yup Essay Research Paper The medium that
Yup Essay, Research Paper The medium that was used in Kevin Killrakis art work was colored pastels. The technique used is shading, and is very creative. Basically, what I see in Kevin?s artwork is two very one of a kind daggers.
Untitled Essay Research Paper Essay on Jefferson
Untitled Essay, Research Paper Essay on Jefferson Jefferson had destroyed political traditions. From his contradictions and defecting his priciples, Jefferson destroyed the political precedent and is a exemplatory hypocrite, which can be seen throughout his administration. Jefferson was an admired statesman who was grappling unsuccessfully with the moral issue of slavery.
The Internet Essay Research Paper Imagine life
The Internet Essay, Research Paper Imagine life today without the convenience of the Internet. People would actually have to get up out of their comfortable chairs, get in their cars, and drive to the store, the library, the mall, or wherever they wanted to go. Wouldn’t that just be a shame? But the Internet has not always been used for the entertainment, in the beginning it was only used by military personnel for communication reasons.
Adlai Stevenson Essay Research Paper Adlai Stevenson
Adlai Stevenson Essay, Research Paper Adlai Stevenson once commented, “It is often easier to fight for principles than to live up to them. ” I have observed this statement to be true in all aspects of life, from common everyday activities
Momentum Lab Conclusion Essay Research Paper Momentum
Momentum Lab Conclusion Essay, Research Paper Momentum has an integral part in the field of physics. However, many people do not know the importance of momentum in everyday life or even recognize it. The truth is that we use momentum in just about every activity that involves motion. When we drive a car we use the principles of momentum to realize how much cushion space we need or how much stopping distance is needed when going a certain speed.
Benefits By The Confucius
’ Ideas Essay, Research Paper Benefits by the Confucius’ Ideas Modern America would definitely benefit from Confucius’ ideas and teachings. Their ideas mainly dealt with unity and peace. The Confucius’ were very
Gaming In Society Essay Research Paper Gaming
Gaming In Society Essay, Research Paper Gaming in Society A wide variety of gaming activities are available in most communities in Alberta. It is possible to gamble almost anywhere in the province because of things like satellites and cable networking. Surveys and research from Alberta Alcohol and Drug Abuse Commission show : the vast majority of adult Albertans gamble at least occasionally during the course of a year. about 40% gamble at least once per week. most gamble for the entertainment value, or to win money.people who gamble all have different amounts of income and are in all different age groups. the percentage of adults who gamble is higher than those who consume alcohol, or smoke tobacco, or take illegal drugs. per capita, adults in Alberta spend $1,344 per year on lotteries and gaming. on average, people in Alberta spend as much on gaming as they do for clothing.
Scripts Essay Research Paper 30
Scripts Essay, Research Paper 3.0 Variables Scripts may contain variables. Variable names must begin with a letter or an underscore (’_'), and may contain any sequence of upper- or lower-case letters, digits, and underscores. You cannot use a reserved word as a variable name. For more information, see the list of reserved words at the end of this document.
Henry Foyal Essay Research Paper Henry Fayol
Henry Foyal Essay, Research Paper Henry Fayol’s Principal of management Fayol was a key figure in the turn-of-the-century Classical School of management theory. He saw a manager’s job as:
Theory Of Knowledge
– Mathematics Essay, Research Paper “As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality.” — Albert Einstein
The Fountainhead Howard Roark And Objectivism Essay
, Research Paper The Fountainhead: Howard Roark and Objectivism In the novel The Fountianhead, Ayn Rand uses the main character, Howard Roark, to express her daringly original philosophy–Objectivism. Like
Islam Essay Research Paper The political system
Islam Essay, Research Paper The political system of Islam is based on the three principles of Tawhid (Oneness with Allah (God)), Risala ( Prophet hood), and Khilafa ( Caliphate). Tawhid means that Allah alone is the Creator, Sustainer, and Master of the universe and of all that exists in it- organic or inorganic.
Computer Scientist Essay Research Paper The title
Computer Scientist Essay, Research Paper The title computer scientist can be applied to a wide range of computer professionals who usually design computers and the software that runs them, develop information technologies, and develop and adapt principles for applying computers to new uses. Computer scientists perform many of the same duties as other computer professionals, but their jobs are distinguished by the higher level of theoretical expertise and innovation they apply to complex problems and the creation or application of new technology.
Untitled Essay Research Paper As John Stuart
Untitled Essay, Research Paper As John Stuart Mills, I believe that my philosophy on government will satisfy the needs of the society. Throughout the 1880?s people have revolted under the circumstances that the government is focused on the society and the individual. My system focuses on liberty, meaning the rights and principles of the individual of a society.
Sun YatSen Essay Research Paper Sun YatSen
Sun Yat-Sen Essay, Research Paper Sun Yat-Sen helped the growth of Nationalism during the early 20th century. After experiencing and studying in Hawaii, he got a taste of what the western world was like. Sun wanted to help westernize China to keep up with the world s technology and economy. His goal was to nationalize China.
Admisions Essay Research Paper What a Regis
Admisions Essay, Research Paper What a Regis University Education Will Mean to Me I want to learn to take risks. I want to change my attitude about taking chances, and if I do take chances to take the right ones. By assessing my academic and extracurricular achievements, I am proud of my accomplishments. I see myself as an open-minded, goal-oriented person who achieves and succeeds through hard work and determination.
Privacy Essay Research Paper As laws policies
Privacy Essay, Research Paper As laws, policies, and technological design increasingly structure people’s relationships with social institutions, individual privacy faces new threats and new opportunities. Over the last several years, the realm of technology and privacy has been transformed, creating a landscape that is both dangerous and encouraging.
Asynchronous Transfer Mode Networking Atm Essay Research
Paper Asynchronous Transfer Mode (ATM) Networking Asynchronous Transfer Mode (ATM) is, and will be for many years to come, the top of the line in networking technology. Since the creation of the Network (the ARPAnet (Advanced Research Project Agency Network)) scientists and engineers have strived to achieve the fastest information exchange speeds combined with the most cost-efficient hardware and software.
JavaScript Essay Research Paper Within this report
JavaScript Essay, Research Paper Within this report is information on how JavaScript is used on the Internet. This report will contain information that will help you learn about JavaScript and its uses on the Internet. It mentions what JavaScript is, where it originated and what some of its uses are.JavaScript is a loosely typed scripting language that resembles the programming language C.
Windows 95 Beats Mac Essay Research Paper
Windows 95 Beats Mac Over the years, there has been much argument over which computer platform to buy. The two contenders in theis competions have been the PC , with its Windows
Cold Fusion Essay Research Paper Allaire
Cold Fusion Essay, Research Paper Allaire’s ColdFusion studio and server package allows web developers to create database driven applications. ColdFusion is server side scripting that utilizes Microsoft ODBC drivers to access system databases. This allows ColdFusion to produce dynamic pages generated real time by the server.
Principles Of Management Essay Research Paper Management
Principles Of Management Essay, Research Paper Management is a set of activities directed at an organization’s resources with the aim of achieving organizational goals in an efficient and effective manner. The first function of management is planning and decision making. Planning is setting and organization’s goals and deciding how best to achieve them.
Frame Relay Essay Research Paper Frame Relay
Frame Relay Essay, Research Paper Frame Relay and Leased Lines In networking there are many options in having data transferred from one location to another. Two of which include frame relay and leased lines. Frame relay is a communication method that transfers data by dividing information into packets and sending them over a virtual network.
Kant
’s Fundamental Principles Of The Metaphysics Of Moral Essay, Research Paper Kant’s Fundamental Principles of the Metaphysics of Moral The central concept of Kant’s Fundamental Principles of the Metaphysics of
Differentiation By First Principles Essay Research Paper
The question says you should differentiate y = x2 by first principles. This means you are not allowed just to write down the answer using any ’short-cut’ rules, but must use the ‘official’ method as follows: First, consider a sketch of the graph of y = xІ (right). You have to find an expression for , which represents
Networking Essay Research Paper There are many
Networking Essay, Research Paper There are many kinds of networks, however this paper will be about networking computers. As we move further and further into the paperless society, the need for people to be connected and able to exchange data just as fast as they could by handing a paper to someone increases.
Ibm Essay Research Paper AppleScript
Ibm Essay, Research Paper * AppleScript Welcome to Macintosh OS Scripting This document is your introduction to the scripting environment on your Mac OS computer. Use it to begin working scripts and scriptable applications. You ll need to know basic Macintosh operations and vocabulary. What is scripting? When you use your Mac OS-based computer, you use the mouse and keyboard to open documents and application programs, move documents and file folders, enter information, print, and perform any other actions you want.
Lucent Technologies Report Essay Research Paper LUCENT
Lucent Technologies Report Essay, Research Paper LUCENT TECHNOLOGY COMPANY OVERVIEW Lucent Technologies is a company that is focused on being a leader in the field of technology in building a broadband and mobile Internet community that will hopefully make a difference in the way people communicate. Lucent also provides the systems, software, silicon, and services for what has been created as the largest networking company built from the ground up in history.
The Physics Ofkites Essay Research Paper The
The Physics Ofkites Essay, Research Paper The Physics of Kites Kites are such interesting items. They are toys for many and learning tools for others. To really understand them, one must take into account some laws of Physics. Physics supplies the answer for exactly how a kite can fly and manuever in the air.
Token Vs Ethernet Essay Research Paper Well
Token Vs Ethernet Essay, Research Paper Well, now I feel confused about this whole situation. I started taking classes part time at BU about five years ago. I took two networking classes, Network hardware and Network management. I didn?t transfer my credits to um because the technology had changed so fast, and I wanted to learn the newest technology.