Add Comment
|
Related Links
|
TrackBack
How to Create and Use AppleScript LibrariesApple script allows you the user to automate tasks on your computer by using simple commands. These commands are in English and can create both simple and complex scripts that can then be called upon from the library, when you need them. For you to be able to use apple script you must first make sure that the program you are making it for supports the use of scripts. Using the application automator (the icon with the white robot) found in your applications folder under mac osx will allow you to select what application you want to make the script for, automator provides a nice graphical interface that makes it easy to this. You can see the online help available from the automators menu. Using automator is really easy and requires no knowledge of a scripting language, you make workflows to do the tasks you require, and the apple script is created. Lets look at a simple apple script (taken from apples website): tell application "Finder" This script is written mostly in plain English and will give you the number of files you have in your applications folder. Let's examine the script closer. You will see that in the script it is written IF folder 'applications' exist. So this is a statement that says that only return the amount of files of a folder called applications if that folder exists. All IF statements must then be followed by an else statement. So in the example above we are writing a script that will return the value of 0 if no files exist in the folder or even if the folder itself doesn't exist. Now look at the statement end if. In plain English that doesn't make sense but if you look at the script you can see that you have started a process and that process is called 'if' so we need to tell the computer that you have finished your task, hence we use the statement 'end if' So using this logic you can see why we also have to end the process 'tell' hence the use of the statement 'end tell' Mac osx also comes with an application called script editer which allows you to edit pre configured scripts or make your own new ones. You can use scripts in many ways to automate tasks that you constantly rpeat on your computer. I hope this article helps you understand more on how to create use apple script libraries. For more in depth information I recommend you check www.apple.com go into the support section and find apple scripts, you will find all the information there to help you. Appleman
Add Comment
|
Related Links
|
TrackBack
Did your message disappear? Read the Forums FAQ. Add CommentSpam Control | * indicates required field TrackBackTrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites. Send Ping | TrackBack URL | Spam Control No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here. Messages, files, and images copyright by respective owners. |
Products
|
Services
45 Users Online
|
Copyright © 1996 - 2024. All Rights Reserved. |