• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Scripting and Automation

Chapter 9. Scripting and Automation

Scripting, a simple form of programming, is well suited to such quick-and-dirty tasks as automating repetitive procedures, simplifying file operations, and even creating small Common Gateway Interface (CGI) server-side scripts for web servers.[1] Scripts are usually plain-text files that can be written and executed without a special development environment and don't require a compiler, a program that turns certain kinds of code into executables.[2]

[1] Yes, Windows Me can be used as a Web Server, as long as you've got the software. Try the Personal Web Server that comes with Windows, or a third-party application like Apache (http://www.apache.org ) or O'Reilly WebSite Pro (http://www.oreilly.com).

[2] Notepad will suffice; see Section 9.12 later in this chapter for more information.

Windows comes with two forms of scripting: the Windows Script Host (WSH) and DOS batch files. Both technologies have their strengths and limitations. DOS batch files are somewhat simpler to write, but WSH scripts are more flexible and offer better user interaction. WSH scripts are Windows-based, have full support of long filenames, and can even communicate with other running Windows programs. DOS batch files run on any PC made after 1982, but WSH scripts run only on Windows 98, Windows Me, and Windows 2000 (earlier versions of these operating systems only with a free add-on). Additionally, you can use both technologies in conjunction to accommodate just about any task you throw at them; see Section 9.8 later in this chapter for an example. DOS batch files are fully documented in Appendix B.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint