apple script?

wolf_pack

Registered
Does anyone program with apple script? i'm just learning to mess around in it but if there is something better for osx because it will be awhile before i upgrade to tiger because of my budget please let me know? I want to learn anything i can in programming from scratch and just learning everything i need to know so programmers give someone help in need...thanks so much..Terry...
 
Right. AppleScript's great, but it's a specialized kind of tool. If you want to write your own applications (with windows and buttons and all that application-y goodness), install Apple's free developer tools and use XCode.

AppleScript's strength lies in controlling other programs and automating complex tasks. For example, I have a script to do a simple find-and-replace operation on a bunch of files' names using the Finder. It's much easier than renaming every file manually. I also have a whole bunch of scripts that perform various operations on groups of tracks in iTunes.
 
'... but if there is something better ...' - ask numerous persons 'what programming language is better', and most will have different opinions.

AppleScript is a scripting language; but, its individual scripts can be self contained, self fulfilling, and saved as a double-click able 'AppleScript applet'.
The code can remain in script form - and accessed (for instant execution) via the 'Script Menu' (available via '/Applications/AppleScript/AppleScript Utility') or 'FastScripts' (or 'FastScripts Lite').

While limited in user interface (a dialog box with static text, a text entry field, up to three buttons, ... - with the ability to accept password text and / or closing after a set number of seconds), AppleScript can be expanded (in its user interface and access to MacOS X functionality) via 'AppleScript Studio'. One programs in 'AppleScript Studio' via 'Xcode' ('/Developer/').

'Xcode' allows one to create numerous formats of code - command line, AppleScript Studio, Cocoa (objective-C), C / C++, Java, etc.

Plus, via the command line (using 'Terminal' - in the '/Applications/Utilities/' folder) - one can program in Perl, Python, and other languages.

There is also available - freeware ('Chipmunk Basic, 'Pascal'), commercial, and shareware ('REALbasic') programming language development software.
 
If you are interested in scripts (as opposed to fully fledged programmes), you might also look into shell scripting from the command line. I never really got to grips with Applescript and hated the amount of typing involved. I've done a lot more with shell scripting than I ever would have with Applescript. Shell scripts can also be written to be portable to other systems, which isn't true of Applescript.

If you are thinking of learning Python, you will probably want to install an updated version since the installed version is quite out of date (even in Tiger) and also incomplete (though it can be made complete with a download if you don't want to install a later version for some reason). There are binary packages for Mac OS X which include support for various Mac OS X things, as well as a GUI development environment. I haven't tried the 2.5 version as that is very new and untested, but the current version of 2.4 seems well supported etc.

- cfr
 
Back
Top