AppleScript: Our Friend. My (sometimes) Enemy. Why you should learn it.

Angus McIntyre angus at pobox.com
Thu Feb 20 17:02:03 PST 2003


At 19:14 +0100 20.02.2003, Jan Erik Moström wrote:
>  ... AppleScript isn't that bad ... the best??
>  ... Java  ... Modula-2 ... REALbasic ... Objective-C ... C++ ... Perl ...
>  Pascal ... Modula-2  ... Fortran ... Lisp ... Occam ...

I've got something of a soft spot for Ruby 
<http://www.ruby-lang.org/>. It was designed as an object-oriented 
language from the outset, and Ruby programs are surprisingly clean, 
concise and easy to understand.

>All languages has their problems but I can't say that AS is that bad.

I find developing with AppleScript is frustrating. Just because a 
language has an English-like (or any other human language-like) 
syntax doesn't necessarily make it easy to learn. What makes a 
language easy to learn and use is consistency, and here AppleScript 
is quite poor, in part because the applications that support it all 
tend to implement things in subtly different ways. What works in one 
application won't necessarily work with another. Implementations are 
also often either incomplete or buggy, adding to the frustration. 
Programming in AppleScript is often a long series of "can't get there 
from here" problems.

That said, when it works, it's great. Being able to script 
applications is very useful.

And now, to bring this post back on topic, can anyone tell me how to 
use the 'indent' command in OmniOutliner's Applescript. I just get:

	NSReceiversCantHandleScriptError

when I try something like:

	tell first document of application "OmniOutliner"
	  set theRow to make new row at end of rows
	  indent (cell 1) of theRow
	end

or
	NSInternalScriptError

if I try the above with:

	indent theRow

What should I be passing to 'indent' to get the proper result?

Thanks,

Angus


-- 
angus at pobox.com                             http://pobox.com/~angus



More information about the OmniOutliner-Users mailing list