16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ipswitch</strong> <strong>WhatsUp</strong> <strong>Gold</strong> <strong>User</strong> <strong>Guide</strong><br />

The following table shows the keywords you can use.<br />

Keyword Description<br />

\\x##<br />

\\<br />

\t<br />

\r<br />

\n<br />

Binary value in Hexadecimal. For example, \\x1B is escape<br />

The "\" character<br />

The tab character (\x09)<br />

The return character (\x0D)<br />

The new line character \x0A)<br />

<strong>WhatsUp</strong> <strong>Gold</strong> versions 7 and 8 users: The %### decimal syntax for specifying binary octets<br />

has been replaced with the \x## hexidecimal syntax.<br />

Example 1:<br />

#<br />

# Note: script comments start with a # character<br />

#<br />

# Send a simple text command<br />

#<br />

Send=Hello There<br />

Example 2:<br />

#<br />

# Send a command followed by CR/LF<br />

#<br />

Send=Select * from Accounts\r\n<br />

Example 3:<br />

#<br />

# Send a binary escape (27) an x y and z and then a nak (21)<br />

#<br />

Send=\x1Bxyz\x15<br />

d. Script Syntax: SimpleExpect Keyword<br />

The SimpleExpect Keyword lets you specify expected responses from a service. Responses<br />

can even be binary (i.e. non-printable ASCII character) responses. If you know exactly (or even<br />

approximately) what to expect you can construct a simple expect response string to match<br />

against.<br />

This keyword allows you some flexibility in accepting variable responses and picking out only<br />

crucial information. If you need additional flexibility you may want to consider using the<br />

regular expression syntax available in the Expect (on page 167) keyword.<br />

The SimpleExpect script syntax is SimpleExpect=Response, where the response is a series<br />

of characters you expect back from the service. The following table displays keywords that<br />

match logic and wildcards to compare responses byte-by-byte expanding escape codes as<br />

you go.<br />

169

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!