ifConditionally perform a statement. If the expression evaluates to anything besides "0", the statement will be executed. If the expression evaluates to "0" the statement will not be executed. Use of the keyword 'not' reverses this behavior. Normally you would branch using a goto statement, but you can use any valid statement after the then clause. Additionally, you can have multiple statements executed by separating them with a semicolon (;). You can use the 'begin' keyword in place of the statement to execute multiple commands. Be sure to terminate the if with an 'end' statement: if not "My web site" in $CONTENT then begin .... end usage: if [not] [expr] then [statement] [;] [statement...]parameters:
examplesif "Login Successful" in $CONTENT then goto success If the variable $CONTENT (which always contains the result from the last protocol command) contains the text "Login Successful" the script will branch to the label ":success". Otherwise the script will continue with the next statment after the if. if not "Login Successful" in $CONTENT then error "Login to site was unsuccessful" If "Login Successful" is not in $CONTENT, then the script will be terminated with an error message ("Login to site was unsuccessful"). Otherwise, the script will continue with the next statement after the if. Alertra Script Language: Language Reference |
|
Website Monitoring · Features · FAQ · Pricing · About Us · Contact Us |
|
Website Monitor · Website Monitoring Service · Site Monitoring · Monitoring Service · Web Site Monitoring |
|