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

Brian C. dvorak at omnigroup.com
Thu Feb 20 00:40:01 PST 2003


On Wednesday, February 19, 2003, at 05:11  PM, Bruce D'Arcus wrote:

> Perhaps a better way for this to work, though, is that the level is 
> not specified by a dialog box (which could get really tedious), but 
> rather by the position of the cursor?  So, the cursor is at the second 
> level in the hierarchy: the outline collapses everything below that.  
> If the outline is already condensed, then it becomes totally expanded.

Seems like it would be doable - if you get something working, I'd love 
to post it on the website as part of the sample scripts package. That's 
where the other script is going, and I'd like to add the document 
conversion scripts that I'm working on, as well. I admit that there are 
some low-hanging fruit on the OmniOutliner tree; great thing about 
AppleScript is that users can work around some of them themselves, and 
their solutions can be right in the toolbar or the menus, just like our 
own code.

Seriously; we are adding stuff as quickly as we can. If you want to see 
something in the app, if you can make it happen via AppleScript, please 
take a shot at doing so, and share the solution here on the list. Hell; 
share the process of fixing it here on the list! That way, everybody 
learns. If you have questions, we'll be happy to answer them.

If you yell loud enough about a lacking feature, I'll probably even do 
it for you in a script, or get Steve to do it in the actual code. But 
it may not work *exactly* the way you want, right off the bat, or at 
all, because we aren't you, and we have to think like you and all the 
other users too. And once a less-than-perfect idea goes into a real 
release, it's that much harder to get it out again and re-done, because:

a) It's more work to write code.
b) It's more work to test code.
c) If it's in a release, no matter how screwed-up the interface or 
backwards the functionality may be, if we change it, someone will be 
pissed off, because they liked it that way.

Doing this script did get Steve and I to think about how easy the 
feature would be to add, and about how the interface should work a 
whole lot faster than doing it in "actual" code would have, and because 
it's less effort to do it via a script, you got a version of the 
feature a lot quicker.  Bruce saw that script, and thought of ways it 
could have been improved to work better for him. And I think it would 
take a couple of lines of pretty simple modification to make it happen.

But if I do that, I'm not answering email to users not on this list, 
and I'm not testing the next beta so we can release it, and I'm not 
working on the last bit of that AppleScript that I've got which takes 
the open document and converts it to a Word doc from the toolbar, which 
could easily be adapted to any other XSLT-based document conversion, 
and I don't know that other users have some other way *they'd* like 
feature X to work, so I might need to do the script again, and so on.

I would love to see you guys come up with a great interface to a useful 
feature, test it, and work out the irksome bugs and let us help and 
watch, because you can change scripts so much easier and faster than we 
could ever generate and release code, Cocoa frameworks be damned. 
Honestly, it would make the app more better more faster, because we are 
few and you are legion, and if we didn't have to implement our bad 
ideas and then get the feedback and then fix it, that's a huge win for 
us, and I just want this app to kick ass and take names like I know 
it's capable of doing.

So, if Jon wants something, and I answer some AppleScript questions, 
and we get a script up there, and Bruce sees the possibilities, and he 
modifies the script and re-posts it, and Steve sees that message, and 
improves on it, and it ends up in the application "for real", we all 
benefit. THAT'S what I really want to see happen, because it means we 
actually *are* the coolest company I've ever worked for, with the 
coolest products, and the coolest platform, and the coolest users. I 
wish I didn't need to rely on you guys as some sort of AppleScript 
rapid-response prototyping team; I wish I had armies of trained 
code-generating and feature-testing attack monkeys, but I don't. =)

And really, that's kinda cool for you guys too - you get a TON of input 
as we work on the app and get to work on your ideas, and you can 
customize it to your exact needs, and you don't necessarily need to 
wait for me to write a bug up, and get it into the queue, and then get 
into a real release some number of months down the line. But if you 
blaze the trail, we can get it in there more quickly. I swear to god. 
The less we have to think about a feature, the more likely it is to get 
in there. Especially if we know that it's useful and the interface is 
well-thought out, and that is all stuff that can happen right here.

> Can folding be handled via an OO Applescript too?

I can't think of a way to do this, but that does not mean that it's not 
possible. See above and discuss among ourselves. ;-)

  <off-topic rant>
For the record, AppleScript is probably the third most uncomfortable 
language I have *ever* encountered. Maybe second, depending on whether 
Haskell or AppleScript irks me more at the moment. I'm un-learning the 
traditional coding syntax and conventions as I go along learning 
AppleScript, which makes simple things for someone raised on AS not so 
simple for me. I HATE that! But it's better than writing prolog code 
back in college ever was. Does anyone else with experience with other 
languages feel this way, or am I just a big AppleScript bigot?
  </off-topic rant>

Sincerely,

Brian C.
Support Manager
Omni Group




More information about the OmniOutliner-Users mailing list