15.04.2018 Views

programming-for-dummies

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

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

Finding an Interpreter 91<br />

In the old days, many companies sold language interpreters (the most popular<br />

were interpreters <strong>for</strong> running BASIC programs), but nowadays, most interpreters<br />

are given away <strong>for</strong> free as part of an operating system (such as Mac OS X) or<br />

another program (such as Microsoft Word). Interpreters <strong>for</strong> open source <strong>programming</strong><br />

languages, such as Perl, Python, and Ruby, are also given away <strong>for</strong> free.<br />

Operating system interpreters<br />

One of the most common uses <strong>for</strong> an interpreter is <strong>for</strong> creating short programs<br />

to automate another program, such as an operating system. The Mac OS X<br />

operating system includes an interpreter, dubbed Script Editor, <strong>for</strong> running programs<br />

with the AppleScript language. After you write a program (script) that’s<br />

particularly useful, you can even compile it into a standalone program, too.<br />

Book I<br />

Chapter 4<br />

Programming Tools<br />

The Script Editor program is usually buried inside the Applications folder on<br />

your Macintosh’s hard disk.<br />

Although Windows doesn’t include a similar macro language interpreter, you<br />

can visit Microsoft’s web site (www.microsoft.com/downloads) and<br />

download Microsoft PowerShell, a free interpreter.<br />

PowerShell is designed <strong>for</strong> system administrators (people who need to control<br />

multiple computers, such as those connected to a network) to control and<br />

automate Windows. By writing simple programs in PowerShell, administrators<br />

can automate their routine tasks, such as starting or stopping a program,<br />

or moving files from one location to another.<br />

PowerShell consists of simple commands (called command-lets or cmdlet)<br />

that per<strong>for</strong>m a single task. By combining multiple cmdlets together where<br />

one cmdlet feeds data into another cmdlet, you can create more complicated<br />

programs.<br />

Web page interpreters<br />

Nearly every Web browser comes with a JavaScript interpreter. Web page<br />

designers use JavaScript <strong>for</strong> creating interactive Web pages, verifying in<strong>for</strong>mation<br />

typed on a Web page (such as a username and password), or opening<br />

pop-up windows that display advertisements.<br />

JavaScript is the <strong>programming</strong> language used to create DashBoard widgets,<br />

which are mini-programs that can pop up on the screen of a Mac OS X computer.<br />

Most Web browsers include a free JavaScript interpreter, but to avoid trademark<br />

problems, Microsoft calls their JavaScript interpreter JScript, which<br />

they include with their Internet Explorer browser.

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

Saved successfully!

Ooh no, something went wrong!