Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aperture

macrumors 68000
Original poster
Mar 19, 2006
1,876
0
PA
I've been learning Visual Basic and I think it is really fun except I'd prefer to know a Mac language. Are there any resources out there that are straightforward for learning AppleScript?

Is AppleScript even the best Mac equivalent to VB? Is the coding at all similar?

Thanks
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
It's not equivalent at all really. The only equivalent is REALbasic but if you're serious about Mac programming learn Objective-C/Cocoa.
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
It's really not that similar. They're both meant to be relatively easy to use, but AppleScript is much more focused on scripting/automating other applications rather than writing apps from scratch (although you can write apps entirely in AppleScript too). Not a bad thing to learn, but don't expect your VB knowledge to transfer over much. You might check out RealBasic.
 

hhas

macrumors regular
Oct 15, 2007
126
0
As other folks say, REALbasic is the nearest equivalent to VB if that's what you're looking for. It's a commercial product, but has the advantage of cross-platform support and its similarity to VB should make most of your VB knowledge transferable.

If you really want to learn AppleScript and already know a bit of programming, get yourself a copy of Matt Neuburg's AppleScript: The Definitive Guide. Be aware though that AppleScript is a somewhat flawed language and pretty much a one-trick pony, so unless your only interest is application automation you're probably better off going with a more general-purpose scripting language such as Python or Ruby.

Personally I prefer Python, but both languages are pretty decent and have excellent documentation, library and community support. They're also cross-platform, with extensive Cocoa and application automation support available on the Mac side, and similar options on the Windows side.

HTH
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
40,077
8,340
Los Angeles
AppleScript is a rather unusual programming language. Its syntax is very flexible in some areas (it tries very hard to look like English) and very picky in others. It's very powerful in some areas and feels primitive in others.

It's one of those languages where it's easy to read a program, but often hard to write one.

The best way I found to learn it was with a good book, some online guides, plenty of experimenting, and wholesale theft of examples people have posted, to use as a starting point for your own programs.

With some languages, I can write a program from start to finish and it is likely to work. With AppleScript, I always seem to need a bit of trial and error, but that's partly because I use it only when I want to do some little task, and I haven't taken the time to fully master it.
 

Aperture

macrumors 68000
Original poster
Mar 19, 2006
1,876
0
PA
I'm not necessarily opposed to learning a new language - I just wanted the best Mac equivalent to VB.

I'd rather not learn RealBasic as I think it would be better to start fresh with a new language and I'd prefer to use free coding tools.

Which is the best language to start with on the Mac? (To write real applications, not just automation scripts) Objective-C?

Is there a good book that is easy to follow for learning ____ language? Please post your recommendations!

Thanks Again
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.