AppleScript: Our Friend. My (sometimes) Enemy. Why you should
learn it.
Nels Freed
nels at molec.com
Thu Feb 20 10:31:01 PST 2003
At 12:39 AM -0800 2/20/03, Brian C. wrote:
>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
I'd asked for a way to get the "anything related to the row" that the
cursor was on. I've not seen anyone post how to do this, and I
recall that "someone" at Omni told me off line that this wasn't
possible, but was on the list of things to do.
If there was a way to do "set theSelection to selection", then this
would be do-able. But the selection keyword is not defined. I've
used the selection for such things as text (and more) in FileMaker,
and SimpleText. One of the reasons I don't think OS X is complete is
that TextEdit, and others don't have the functionality. I think it
should have been in Cocoa. If it were, the OO would have it without
additional effort, so adding it is likely a huge pain. But if one
could use the selection key word to get the selection, and then use
"row of selection" or "selected row" then the row could be had, or
the "cell of selection" or "selected cell". Then you'd not have to
have the dialog. But as it is the dialog box is necessary because
you can't get the row, cell, selection, at the current cursor
position. At least I've not found this out. If it is possible, all
I would say it "woo hoo", "yippy", "awh right!"... :) And please
please let me know how to do this!
> <off-topic rant>
>For the record, AppleScript is probably the third most uncomfortable language
I noticed that someone likes VBS better, at least this was the
impression I got. I'd rather use AppleScript than VBS because VBS is
almost a traditional language, and when learning it I often made
mistakes because it does weird things. i.e. as a scientist I did a
calculation, and the accuracy was way way off. things like that.
Where as AppleScript appears to me to be an attempt at making the
computer programmable with English. When I think of it that way I'm
ok with it. VBS is a MicroS#$t version of AppleScript. Just thought
I'd mention it.
Also I tend to write scripts that work for me, but not share. (The
folks at BBEdit also asked me to share if I solved a problem with a
script - I can just haven't taken the time yet) If the above
selection functionality is added, then I promise to share. I don't
have my OO script done because I need to be able to get the selection
or cursor position.
The script I want to do is to select a [row find the] cell and then
run the "start" script. This would open the row as a project. I
could then run the "stop" script and add time to the time cell. i.e.
use an outline to break down a project into smaller pieces, and the
track the time spent on each piece. I need to do this to get a
better idea of how long it takes for me to get things done, as I
overran my first project so badly it was canceled. So I want to be
able to increase my ability to project project times, and I can't do
that if I have no idea how long it takes me to get things done...
Nels
More information about the OmniOutliner-Users
mailing list