• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder Tell Blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Tell Blocks


  • Subject: Re: Finder Tell Blocks
  • From: Sander Tekelenburg <email@hidden>
  • Date: Mon, 4 Mar 2002 15:01:23 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 19:23 +1300 UTC, on 04-03-2002, Andy Wylie wrote:

[...]

> not quite, you can grab something from an app and tell it nuthin...
>
> display dialog ("MACS" is in (application "Finder"'s every process's name))
> as string

Hm, does that actually work for you? It doesn't for me: "Finder got an error:
Can't get name of every process." (This is under Mac OS 9.2.1)

This notation does work for me:
display dialog ((name of every process of application "Finder") as string)
contains "MACS"


Anyway, while it is certainly true that in such a case you don't tell the
application to *do* something, and you also don't use the "tell" terminology,
you are still talking to an application. So calling this "to tell it nothing"
would be a statement that I'd expect to be confusing to new users.

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


AS was designed to be like natural english to be more easily comprehensible
to people without any programming experience. In that same vain, speaking in
short, simple sentences will be far more comprehensible to new users than
writing long, beautiful but complicated sentences. There's nothing wrong with
beautiful, complicated language (quite the contrary - this world lacks it too
much), but we shouldn't throw it too easily at new users.


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPIN+J+sywKfXgqKdEQJUGACg+ktmRhW6P/E6BQeH0GNHc3f7WSMAoM0H
6wBccG5qhElKOZzDjqtt0JUT
=D3Cw
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
_______________________________________________
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.

  • Follow-Ups:
    • Re: Finder Tell Blocks
      • From: Andy Wylie <email@hidden>
References: 
 >Re: Finder Tell Blocks (From: Andy Wylie <email@hidden>)

  • Prev by Date: Re: Damn send button / Wind chill
  • Next by Date: Re: Finder Tell Blocks
  • Previous by thread: Re: Finder Tell Blocks
  • Next by thread: Re: Finder Tell Blocks
  • Index(es):
    • Date
    • Thread