Re: Finder Tell Blocks
Re: Finder Tell Blocks
- Subject: Re: Finder Tell Blocks
- From: David Groover <email@hidden>
- Date: Mon, 4 Mar 2002 10:09:00 -0500
Thus spake email@hidden:
>
Another thing is that while this sort of notation is certainly fine, and has
>
its advantages, for less-experienced scripters it is hard to
>
read/write/debug. The following notation does not suffer from that:
>
>
tell app "Finder"
>
set theProcesses to name of every process
>
end tell
>
if theProcesses contains "MACS"
>
display dialog true
>
end if
I appreciate the debates, and the clear explanations like this one. This
brings up another frustration of mine which perhaps you can clarify for
me? I like to understand the why and how of the components as much as
understanding the results and how to set them up.
Explaining: I understand tell "Finder" xxxx is telling the Finder, an
app, "whatever".
I understand that using the term, "set" sets a variable to a value. But I
have not understood what I assume is the language of "logic" used in AS
(and probably most scripting languages).
When you wrote "display dialog true", Then I have some confusion. I also
see the use of "0" in formulas that don't have any mathematical
significance. I assume that set xxx =1 or set xxx = 0 are purely
statements of logic and not mathematical expressions at all.
My first foray into scripting was in FileMaker with "IF" and then nested
if and then case statements. All that used logic. If condition alpha is
not 0 then perform formula A, otherwise perform formula B. So I
understand the use of logic. I even enjoy it. I just have not seen it
explained in an expanded sense, how it gets used in AS, and hence have
found it a hindrance to my learning process.
If a returned value of 1 or zero means true or false, how do I parlay
that into a similar process as an "IF" statement?
Can you say what some classic decision making terminology is in AS? I
understand If, else. I understand case. What about zeros and ones? Am I
on track with my assumptions about that?
And what about "display dialog true"? After reading that again I think
you are just putting a dialog box on the screen that a true condition has
been met, relative to an earlier scripting parameter. But what are the
decision parameters in AS? Understanding the logic would help in learning
the terms and the process (for me).
Thanks
Dave Groover
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.