Cincieas da computacao

Disponível somente no TrabalhosFeitos
  • Páginas : 51 (12622 palavras )
  • Download(s) : 0
  • Publicado : 21 de abril de 2013
Ler documento completo
Amostra do texto
APPLESCRIPT FOR ABSOLUTE STARTERS

By Bert Altenburg Cover graphics: Peter Fischer

INTRODUCTION
AppleScript is a revolutionary Apple technology that makes communication between computer programs possible. For example, with AppleScript you can - retrieve e-mails from Mail and store them in a database; - tell a picture editing program to change the resolution of a series of pictures, resizethem, and send the resulting pictures to another computer or post them on the Web; - and much, much more. An AppleScript, or script for short, is a series of written instructions in a scripting language named AppleScript. This language resembles the English language, making AppleScripts both easy to read, write and understand. Despite its power, AppleScript is heavily used in a couple of fieldsonly. The publishing industry depends on it for workflow automation (PhotoShop, QuarkExpress, InDesign). Filemaker Pro developers use it for creating Mac-based kiosks, which you can find in malls and museums (k-Builder). Apart from the programs mentioned, many more major and minor Macintosh programs like GraphicConverter, BBEdit, and Word are AppleScriptable. That means you can use AppleScript toboss these programs around. Scripting applications is not the focus of this book, however. There are other books on the market that show you how to do that. If these books provide an introduction to AppleScript, it is usually cursory and they quickly dash to the really juicy stuff, which generally requires a modest or good knowledge of the basics of AppleScript. The aim of this book is to provideyou just that. It is intended to update and expand this book on a regular basis. So, you may want to check for new versions (see Chapter 15). A second book on scripting various programs is considered. This book is freeware, and you are encouraged to bring it to the attention of other Macintosh users. In this respect, please pay attention to Chapter 0 in this book on how you can promote the Mac. Onceyou dive into the world of AppleScript, you’ll notice that the term ‘AppleScript’ is used quite loosely for three different concepts. - The AppleScript language: The English-like language which is used to give written instructions to your Mac; - An AppleScript: A series of instructions, a.k.a. a script, written in the AppleScript language; and - A part of the Mac operating system (Mac OS X),which actually reads an AppleScript and executes the instructions containing it. In this book, if there is need to refer to one of these three concepts specifically, the following terms are used respectively: - The AppleScript language; - An AppleScript or a script (noun); - The AppleScript component of Mac OS X. Learning how to script with AppleScript is ideal as an introduction to programming. Itleaves out most of the nitty-gritty work a programmer in a computer language such as Java has to do before she can even perform the easiest of tasks. AppleScript is easy enough that a 10 year

old can learn it, yet so powerful that professionals enjoy it too. That leaves plenty of room for growth for you. While not covered in this book, you can even use AppleScript to build computer programs thatlook and work just like the commercial programs you use on your Mac, with buttons, menus, scroll bars and all. This requires AppleScript Studio, provided for free by your favorite computer company. What is the difference between scripting and programming? I’d like to think that if it is easy, it is scripting and if it is difficult, it is programming. However, javascripting is not easy in my book,so perhaps that definition is wonky. How to use this book? As you will see, some paragraphs are displayed in a green font. We suggest you read each chapter (at least) twice. The first time, skip the green text. The next time you read the chapters, include the green paragraphs. You will in effect rehearse what you have learned, but learn some interesting tidbits which would have been distracting...
tracking img