![]() The Run button will attempt to run your script from the Script Editor. Scripts can be very easy to read, but are still somewhat fussy on how they are typed. At first, these dialogs can also be mostly ignored. If something doesn't make sense to the compiler, you will receive a dialog warning. It doesn't check your spelling as much as the syntax or structure of your scripts. The Compile button is kind of like a spell check for scripting. Actually, I don't think either of them are red. The Toolbar has two main buttons that will be used repeatedly, the Compile button (Command-k) and the Run button (Command-r). Everything we do in this post will take place in the main window and on the toolbar. ![]() The lower window can be largely ignored for now. The lower window is for various results from running your scripts. The main upper window, also called the Script Source window, is where you type the scripts. The Script Editor contains two main windows and a toolbar. Once opened the Script Editor is, for all practical purposes, a fancy text editor. You can get there in the Finder from the Go Menu and choose Utilities. The Script Editor, also called the AppleScript Editor in earlier Operating Systems, can be found in the Applications/Utilities folder. Just kidding, actually IDE is Integrated Development Environment. The Script Editor IDE (an Irresistible Daring Environment) It's okay though, this is normal and only shows how much room for advancement actually exists. I find some sneaky scripts online that completely baffle me, and look more like math equations than anything. Although, there are many levels of expertise beyond my dabbles. Just looking through your script pretty much tells you what it will do, and to what. So the benefit is having an easier to understand process from beginning to end. Meaning, at the dabbler level, most commands and blocks of script are typed with easy to understand words that read just like the English language. When I began my own scripting adventures with AppleScript in the early nineties (Was it System 7?), this is also how I began.ĪppleScript is known as an 'English-like' language. However, the above project is actually much easier than one might think. I know what you might be thinking, programming is complex. Rather than printing the words on the screen, we will have the computer actually 'say' the words instead. These traditional words are, "Hello World." In keeping with Apple's usually non-traditional method, and considering the AppleVis community, there will be a slight variation in our own approach. ![]() In the traditional methods of teaching any programming, the first project is always, showing how to create something that presents two simple words on the computer for the user to see. Now that I have completely scared the pants off you, put something comfortable on, grab some coffee or tea and lets get started. It has been and continues to be, one of the most frustrating, gratifying and amazing adventures I have ever embarked upon. Dabbling with easy AppleScripts has expanded my thought patterns and taught me much about Mac OS and my computer that I might never have learned otherwise. I am perfectly happy staying at that level. I have personally enjoyed the easier scripts that help automate my systems. Admittedly, I am more of an advanced dabbler, but I am certainly no expert. ![]() I can say, in the twenty-five years that I have dabbled with AppleScript, I have never had to reinstall any software because of my scripting. I will include any links I can find near the bottom of this post. That is not to say that it is overly dangerous, or that there is no help out there, many resources exist that can assist on your journey. ![]() Having a back up of your important stuff is a very good idea. Such is the fate of any developer, regardless of the platform or experience. If you enter the world of scripting or programming, whatever you create you own completely yourself, failures or successes. Enter at your own risk, for once the journey has begun the "you" you have always known may never return.ĭisclaimer: Apple, AppleVis and Nicholas are not responsible for anything you may do to, with or for, your computer. Once You gaze into the System, the System also gazes into You! :-)įair warning! Any programming and scripting adventures can at first, be very frustrating, extremely rewarding, can sink you into the depths of a learning curve for a long period of time, expand one's thinking patterns far beyond normal, cause one to pull one's hair out, cause one to become much faster and productive on their computer, can at times force one to restart their system frequently, and quite possibly be the most amazing and fun thing you have ever done. ![]()
0 Comments
Leave a Reply. |