Separate names with a comma.
Discussion in 'Mac Programming' started by TIProgrammer84, Jul 8, 2014.
Can someone tell me the purpose of Applescript and the practical applications of learning it?
The purpose is to allow you to automate actions in applications that support Applescript. If you have many repetitive tasks that you want to carry out then maybe using Applescript will allow you to speed up the entire process (assuming the task uses an app that supports Applescript automation).
It's a higher level tool that allows you to leverage the abilities of many applications.
Example 1: Say you want to rename a bunch of files. The cumbersome way is to write some C/Obj-C/etc. code that talks with the file system and does the renaming. With AppleScript you can tell the Finder to do it for you.
Example 2: You have a bunch of photos takes on an iOS device. These images are RGB at 72 dpi. You want to convert them to 300 dpi/CMYK compressed TIFF files. You could write some Obj-C code calling Image Kit (or some other language with another image library) or you could realize that Photoshop is pretty good at handling images and let it do the work for you.
In short -- it's a way for automating what would otherwise be a manual workflow by linking together commercial applications. Caveat -- the developer of the application has to have exposed their functions to AppleScript or you have to try your luck at UI Scripting.
as has been said reptitive workflows, use the tools you've already got to do something neither in itself is capable of doing.
Excel spreadsheet with bundle of stuff I regularly shop for
Stick a Y in the order column of each item I want to buy this time
save the spreadsheet.
Launchd sees the file has been saved and launches an applescript
applescript then generates a set of Reminders grouped by shop, those sync accross cloud to iphone. Done.
Excel cant export reminders, Reminders cant import excel sheets Applescript bridges the gap.
learn Xcode. its more advanced and its for mac, iPhone and iPad.
Xcode is an IDE, not a language.
What AppleScript is was well described by previous replies. But it's not a generic language I would suggest you to learn as a novice programmer. Instead I would prefer to put languages like C, Objective-C, Java or maybe Apple's own newly released language Swift at the beginning of your learning curve.
Here's what Apple had to say about it in their marketing material, ca. 2001: