Member
Join Date: Oct 2006
|
How do I learn applescript and is it complex to learn? What is applescript? Obviously the name gives you an idea that it's a programming language, but is it like VB for macs?
|
quote |
Veteran Member
|
Basics of Applescript, and background:
http://en.wikipedia.org/wiki/AppleScript Applescript Studio: http://www.apple.com/applescript/studio/ A forum you could go to: http://bbs.applescript.net/ |
quote |
Member
|
A quick google brings up many things. I don't personally know how to do it, but there looks to be some fairly comprehensive stuff. As said in the other thread, google! Here's one I found that looks to be quite comprehensive!
|
quote |
Veteran Member
Join Date: Mar 2005
Location: Near Indianapolis
|
I'm glad to see you decided to stick around. I promise we're not all pricks, that was just a strange thread. This one, however, is good.
Why, though, do you want to use AppleScript? Is there something specific you want to do, or do you just want an intro to Mac programming? If you just want to develop for the Mac, you should look into Cocoa and Objective-C instead. They allow you much more flexibility in the kind of applications you can create, and they are a very powerful combination. |
quote |
Member
Join Date: Oct 2006
|
I want to learn mac programming and applescript seems like a good start, I want to be able to make programs that are small and distribute them to everyone for free. I am not very good in mathematics however and that's one reason I failed my C++ course two years ago.
|
quote |
is the next Chiquita
Join Date: Feb 2005
|
Thought I'd at least mention that VB != Applescript.
Applescript is a scripting language (can't think of a Windows equilivant right now... Would Macros in Excel count?) whereas VB is programming language. You could go to www.en.wikipedia.org and find out how scripting and programming language differs. Basically scripting are good for doing some kind of repititve tasks and reply on high level function provided by OS whereas programming language has more power and flexibility but requires much more work. HTH. |
quote |
Veteran Member
Join Date: May 2004
|
Sorry Banana, but I respectfully disagree. The distinction used to be one of compiled-vs-interpreted, but with things like Java running around, it's gotten really fuzzy.
The best definition I've seen yet goes something like: Programming languages write applications more or less from scratch. The external functionality that you integrate comes in the form of libraries. Scripting languages tie applications together to do more complex tasks. The external functionality that you integrate comes in the form of applications. Python is generally seen as a scripting language, for instance, because it is interpreted, but you can write complex apps in it, and never hook together other apps or tools. I'd consider it a programming language. AppleScript is traditionally also a scripting language, to drive applications and tie them together. However, with things like AppleScript Studio popping up, it's becoming more of a stand-alone language. Carbon Copy Cloner, for instance, is an AS application that is indistinguishable from any other application. From a theory point of view, it's all moot, since both scripting and programming languages are Turing complete, and mathematically equivalent, it's simply a matter of semantics based around how the external functionality is bundled: libraries, or applications. |
quote |
Veteran Member
Join Date: Oct 2004
Location: Leiden, the Netherlands
|
Apple script has got an user-friendly front end called "Automator". It might be worthwile to check out.
|
quote |
Veteran Member
Join Date: May 2004
|
Automator doesn't have anything to do with AppleScript, sadly, it's Yet Another Hook Infrastructure for apps.
|
quote |
Veteran Member
Join Date: Mar 2005
Location: Near Indianapolis
|
But Automator can be used to run AppleScripts.
New guy, are we confusing you yet? |
quote |
Veteran Member
Join Date: May 2004
|
|
quote |
is the next Chiquita
Join Date: Feb 2005
|
Quote:
Kick, apparently I didn't realize that my understanding of scripting language was that dated. I mean, when I go look at Excel macros (you didn't say whether that counts as scripting or not), I can't help but feel well, limited compared to what I can do in VBA which is in turn limited compared to VB .NET, which is in turn limited compared to C++. Just because someone can write bazillion lines to get around weakness of single language to do something that can be done in one line in another language doesn't make the first language necessarily Turing complete, but hey I'm an ignoramus- what do I know? |
|
quote |
Microbial member
|
For what it's worth, Applescript Studio (i.e. Applescript for writing apps with rich user interfaces) isn't that hard to use, although it would be a little bit frustrating to write anything big in due to the extreme simplicity of the Applescript language. But if all you want to do is write a tiny little app as a first step in Mac programming, it should be fine.
If you're looking for something with a VB vibe, you may want to check out RealBasic. It's an object-oriented BASIC development environment for Mac, Linux and Windows, and can even cross-compile for all three platforms. Unfortunately, it costs money, and they still haven't come out with a Universal Binary version yet (although it's promised for this quarter). There's a 30-day trial, so you can at least get your feet wet before you decide to spend the money. In the long term, if you plan to do larger Mac-only projects, it may well be worth gritting your teeth and learning Objective C/Cocoa. On the plus side, I don't think it's quite as horrible as C++. Kickaha would be better qualified to take you through the differences though. |
quote |
Veteran Member
Join Date: May 2004
|
Quote:
What you're comparing between the languages is relative levels of abstraction. A higher level of abstraction makes complex things easier, but it doesn't add any intrinsic capabilities that wouldn't be possible in a lower language. Quote:
Automator scripts? Not Turing-complete. No branching. AppleScript? Turing-complete. Anything you can do in C++, Java, C, Pascal, Basic, Fortran, APL, PL/1, Perl, Python or Cobol, can be done in AppleScript. |
||
quote |
is the next Chiquita
Join Date: Feb 2005
|
Just realized that my second quoted statement,
Quote:
When I said that first language isn't Turing-complete, I was thinking more like it's not *as* Turing-complete compared to the second language; or put it in other way, second language meets the criterion for Turing-completeness much better than first language, even though both satisfy the necessary condition of Turing-complete. Is that still inaccurate? |
|
quote |
Microbial member
|
Yes, because something is either Turing complete or it isn't. Once it's Turing complete, you can't really talk about degrees of Turing-completion. Have a look at the Wikipedia article.
Having said that, there's a big leap from "Turing complete" to "usable as a programming language for complicated modern applications", which I think is more what you're getting at. |
quote |
Veteran Member
Join Date: May 2004
|
Indeed, and that's where the levels of abstraction comes in. While you can replicate anything from Java in straight assembly (obviously, otherwise you'd never be able to run the Java code on a chip), doing so would be painful.
|
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AppleScript controlling iTunes Music Store? | nassau | Programmer's Nook | 0 | 2006-05-17 08:28 |
How many of your posts do you post? | alcimedes | General Discussion | 48 | 2006-01-21 18:27 |
Posting to Blogger via Applescript | noleli2 | Programmer's Nook | 2 | 2005-12-25 17:48 |
post stupid things | Luca | AppleOutsider | 34 | 2005-07-15 15:47 |
Ever Made a little "ditty"? Post it here | Fooboy | AppleOutsider | 5 | 2005-02-27 00:08 |