User Name
Password
AppleNova Forums » Programmer's Nook »

A new post: Applescript


Register Members List Calendar Search FAQ Posting Guidelines
A new post: Applescript
Thread Tools
prestigerg1570@aim.com
Member
 
Join Date: Oct 2006
 
2006-10-02, 14:15

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
Fahrenheit
Veteran Member
 
Join Date: Sep 2005
Send a message via ICQ to Fahrenheit  
2006-10-02, 14:17

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
revolution
Member
 
Join Date: Apr 2005
Location: Nottingham, UK
Send a message via AIM to revolution  
2006-10-02, 14:18

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
Wyatt
Veteran Member
 
Join Date: Mar 2005
Location: Near Indianapolis
 
2006-10-02, 14:19

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.

Twitter: bwyatt | Xbox: @playsbadly | Instagram: @bw317
  quote
prestigerg1570@aim.com
Member
 
Join Date: Oct 2006
 
2006-10-02, 14:22

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
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2006-10-02, 14:27

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
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-10-02, 14:54

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
julesstoop
Veteran Member
 
Join Date: Oct 2004
Location: Leiden, the Netherlands
 
2006-10-02, 14:56

Apple script has got an user-friendly front end called "Automator". It might be worthwile to check out.
  quote
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-10-02, 14:59

Automator doesn't have anything to do with AppleScript, sadly, it's Yet Another Hook Infrastructure for apps.
  quote
Wyatt
Veteran Member
 
Join Date: Mar 2005
Location: Near Indianapolis
 
2006-10-02, 15:02

But Automator can be used to run AppleScripts.

New guy, are we confusing you yet?
  quote
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-10-02, 15:15

Quote:
Originally Posted by fcgriz View Post
But Automator can be used to run AppleScripts.

New guy, are we confusing you yet?
Automator can also be used to run shell scripts, Python scripts, Perl scripts, or any other script/program/file you have on your drive.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2006-10-02, 16:41

Quote:
Originally Posted by Kickaha View Post
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.
OP, aaannnnddd that is why one does background research or you get bushwhacked by a hung-like-a-horse bushman.

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
staph
Microbial member
 
Join Date: May 2004
Send a message via AIM to staph  
2006-10-02, 19:13

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
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-10-03, 01:30

Quote:
Originally Posted by Banana View Post
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++.
Excel macros would be an internal scripting language, ie, macros... actually, I'm curious - I can't recall if they're Turing-complete or not. IIRC, they have for loops, conditionals, variables... looks like it. It's just a language that is confined within a specific application's boundaries.

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:
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?
You'd be shocked at how little is needed to make a language Turing-complete. (Hint: assembly languages are Turing-complete.)

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
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2006-10-03, 05:51

Just realized that my second quoted statement,
Quote:
Originally Posted by My smelly, old brainfart
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?
... didn't convery what I was thinking.

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
staph
Microbial member
 
Join Date: May 2004
Send a message via AIM to staph  
2006-10-03, 06:46

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
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-10-03, 09:51

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
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
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


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 10:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova