Scripting Example: Programming Internet Explorer

To give you a taste of the power and flexibility of Automation programming, this section shows you how to program a specific Automation server: Internet Explorer. You’ll see that your scripts can control just about everything associated with Internet Explorer:

  • The position and dimensions of the window.

  • Whether or not the menu bar, toolbar, and status bar are displayed.

  • The current URL.

  • Sending the browser backward and forward between navigated URLs.

Displaying a Web Page

To get started, we’ll show you how to use the InternetExplorer object to display a specified URL. You use the Navigate method to do this, and this method uses the following syntax:

InternetExplorer.Navigate URL, [Flags,] [TargetFrameName ...

Get Insider Power Techniques for Microsoft® Windows® XP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.