Internet Commands


The Internet actions allow you to complete various tasks on the web. You can access the web through browsers such as Internet Explorer and Netscape, email protocols, or FTP (File Transfer Protocol).

The available commands are:

  Start Browser
  Start Email
  Open a Web Page
  Get Web Page Text
  Extract Web Tag/Link
  Download
  HTTP Post
  Check Email: POP3
  Delete Email: POP3
  Send Email: SMTP
  Send Email: MAPI
  Send Email: "mailto"
  FTP File List
  FTP Download
  FTP Upload
  FTP Delete File
  FTP Create Folder
  FTP Delete Folder
  Ping IP Address



  Start Browser
 

Launches the web browser that is installed on your system. This may be Internet Explorer, FireFox, or another program. By design, the normal default home page is automatically loaded. This initial (default) web page is configured in the browser's options. To open a specific web page, use the Open a Web Page action.


  Start Email
 

Launches the default email program that is installed on your system. This may be Outlook, Eudora, or another program.

Please note that if your default email program is Hotmail or some other web-based email, you may see a strange program for Start Email, such as "rundll32.exe C:\Program Files\INTERN~1\hmmapi.dll,OpenInboxHandler".


  Open a Web Page
 

Loads the web site that you provide. If you are not connected to the internet, an error may occur depending on your local internet settings. If possible, vTask will attempt to connect to the internet in these situations. If you have changed the system file association for .HTM/.HTML, a different browser may be loaded. Be sure the .HTM file association is linked to your browser via Windows Explorer - Tools - Options - File Types.

If the HTML page is loaded into a preexisting browser window, and not a new browser window, you need to modify your settings in the browser's "Tools - Options" menu. How a web page is loaded is based on the browser configurations, not vTask options.

Some browsers, such as Firefox, require an extra switch to load a webpage:   "firefox.exe -url http://ww.yahoo.com". vTask automatically handles these situations (if the browser was correctly installed).


  Get Web Page Text
 

Saves all the text on a web page to a local .TXT file. This functions the same as right clicking in a web page and selecting "Select All - Copy". Images, buttons, and other graphic text will not be saved.


  Extract Web Tag/Link
 

Scans a web page for a tag, and extracts the required information. This is typically used to extract the URL from a link, such as  <a href="index.htm">Main Page</a>.

The "tag" can be a link (href), <div> tag, table data, or anything else that is in the HTML source. For example, you could retrieve an entire table by searching for the name of its ID tag.

When extracting the details from the "About Google" link, the following information can be returned:

OptionSample Data
Link HREF (Relative)/intl/en/about.html
Link HREF (Absolute)"http://www.google.com/intl/en/about.html"
Raw HREF Tag<a href="/intl/en/about.html>About Google</a>
Raw Inner Tag<div class=gbd></div>


The returned HREF link can be clicked with the "Open a Web Page" or "Download" commands. To access the HREF, and go to its URL, the following script would work:



Sample Script:   (Copy and paste into vTask)
<step>
    <action>Extract Web Tag/Link</action>
    <text>http://www.google.com</text>
    <options>Link HREF (Absolute)</options>
    <value1>About Google</value1>
    <output value="%link">Variable</output>
    <comment>Extract the "About Google" link</comment>
</step>
<step>
    <action>Open a Web Page</action>
    <text>%link</text>
    <comment>Go to the link</comment>
</step>

Result:



  Download
 

Downloads a file, web page, or any other web data. It is not necessary to save to a physical file when you download data. You may also save to a variable or other location (see Save Result for more options).

The progress of the download is displayed in the status bar of vTask. You can check the success of the command with the {HTTP_STATUS} System Variable. It returns the standard HTTP codes for web pages (200=OK, 404=Not Found, etc). A simple search of "HTTP Status Codes" will provide many reference sites.

During slow connections (such as dialups), this command may take several minutes to complete. This functions the same as choosing "File - Save As - Complete" in the browser window's menu.


  HTTP Post
 

Sends a post string to a web server. The format for a standard POST string is:

http://www.server.com/isapi.dll?param1=one&param2=two

- or -


http:///www.server.com/order.pl?product=1234&customer=4567

You have the capability of saving the return data into a variable, however it is not necessary to save or check the result of a POST command.

This command is useful for sending information to a web server, so that further processing can be taken. ISAPI DLL's, ASP pages, and Perl CGI scripts are some of the server-based technologies that accept POST strings.

You can check the success of the command with the {HTTP_STATUS} System Variable. It returns the standard HTTP codes for web pages (200=OK, 404=Not Found, etc). A simple search of "HTTP Status Codes" will provide many reference sites.


  Check Email: POP3
 

Logs in with the credentials you supply and checks for new email. The email read is based on the "Which Email" field. This field is 1-based, so 1 would read the first email, 2 the second, and so on. Leave blank or set to 0 to return a count of all messages.

If the requested email is greater than the number of new emails in the inbox, an error occurs. The POP3 host should be in the format of "mail.server.com". Email saved to variables are have the format "Subject: [the subject line appears here], Message: [the body text appears here]"

The default port is 110. You can leave this field blank if you don't know what it should be.


  Delete Email: POP3
 

Functions the same as "Check Email: POP3" listed above, but deletes the requested email instead of reading it.


  Send Email: SMTP
 

Sends an email via the SMTP protocol. Multiple recipients can be included, separated by a comma or a semicolon ( , ; ). For SMTP, the "From:" field is not required. If not provided, this will be filled out automatically by vTask. The default SMTP port is 25 (but may be left blank).

SMTP troubleshooting can be difficult, but it does work if all the parameters are correct. If you have issues, try with a empty Port setting, and vTask will attempt to determine the correct one. Try using Yahoo mail's SMTP server for testing: "smtp.mail.yahoo.com" (they've changed it in the past).


  Send Email: MAPI
 

Sends an email based on the locally installed MAPI client. Outlook Express is an example of a MAPI client. You may be prompted to verify the send based on the security settings of your computer. This will fail if no MAPI client is installed.


  Send Email: "mailto"
 

This will send an email via the default browser's "mailto" HREF. This functions the same as the HTML command "<a href='mailto:person@server.com'>" This action works well as an fail-safe option method for sending emails. Additional prompts may be shown by Windows to complete the send.

This method requires an email association to be set (usually for ".eml" file types). This is normally done automatically by your email client program.


  FTP File List
 

Performs a directory listing of the files located at the specified location. A sample location would be "ftp.server.com/folder/*.jpg", which would return a listing of all JPEG files on the server.

The file list is returned delimited with newlines:

      file1.jpg
      file2.jpg
      etc.


You may use wildcards (*,?) to match a pattern of files, the same as a file listing in Windows or DOS.


  FTP Download
 

Downloads a file from an FTP server using the login credentials that you supply. The "Server/Dir/File" format should be like "ftp.server.com/folder/source.zip". Be sure the startup folder is correct if you encounter errors with FTP. Each system has different startup folders ("local_html", "public", etc). You can use a program like "WS_FTP" or "FileZilla" to verify folder names and logins.

The progress of the download is displayed in the status bar of vTask.

The Cache Connection option indicates to vTask to maintain the login connection open as long as the script is still running. This feature allows large transfers of many files without the overhead of constant connecting/disconnecting each file. Any other FTP command will re-establish (re-open and close) the connection. Otherwise, the connection will close automatically by vTask when the script ends.

If there is a problem with the FTP server or file, vTask will return the error given by the server. It will be displayed in the Output window, as well as in an error message (if you choose that option for the "Failure Mode"). This may be a cryptic error message, but it is simply what the FTP server returns to vTask. For example, the following error ws generated by a "File Doesn't Exist" problem:




  FTP Upload
 

Functions the same as "FTP Download" listed above, but sends the requested file instead of receiving it. If the final destination directory (folder) does not exist, the file upload will fail. You must have permissions to upload files for this action to succeed.


  FTP Delete File
 

Functions the same as the other FTP actions listed above, but deletes the requested file instead of sending/receiving it. You must have permissions to delete files for this action to succeed.


  FTP Create Folder
 

Functions the same as the other FTP actions listed above, but creates a new directory (folder) instead of working with files. On some ftp servers, it may create entire new tree structures ("new folder 1/new folder 2/final folder"), but on other systems you may have to create each new sub-folder separately. You must have permissions to create folders for this action to succeed.


  FTP Delete Folder
 

Functions the same as the other FTP actions listed above, but deletes an existing directory (folder) instead of working with files. Delete Folder will fail if any files still exist in the directory. Delete remaining files before trying to remove the folder. You must have permissions to delete folders for this action to succeed.


  Ping IP Address
 

Attempts to contact a computer / network address. Functions the same as the PING command in Windows. This action will succeed if the computer responds within the timeout listed in the "Max Wait" field. Either the machine name ("www.yahoo.com") or the IP address (192.168.0.1) may be used in the "Hostname / IP" field. If your computer is not connected to the internet, vTask will attempt to connect. Otherwise, this command will fail.

The ping command will not fail unless the IP address is invalid. To check an internet connection, use the "IF Connected to Internet" command instead.