• 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: Finding Filenames that contain a certain string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding Filenames that contain a certain string


  • Subject: Re: Finding Filenames that contain a certain string
  • From: "J. Stewart" <email@hidden>
  • Date: Fri, 20 Jul 2007 20:16:53 -0400

On 7/20/07 at 3:19 PM, Stockly, Ed <email@hidden> spake thusly:


Also, going back to the original purpose of this list, novice
appleScripters should be given applescript solutions.

A lot of things came to mind when I read this, I won't include them for various reasons. I will just say this is a load of bologna! Novice Applescripters should be given advice on what best serves to implement their solution (that they can handle) regardless of whether it's Applescript or not. This doesn't mean that they shouldn't also be given the equivalent Applescript so they can learn when and how to use it.


The difference is that you can master one language (appleScript) and do all
sorts of wonderful things, like getting and manipulating dates.

To effectively use shell scripting you must learn a second scripting
language, which, in terms of human readability, is the opposite of
appleScript.

I disagree, you need not learn a second language to use do shell script but you certainly need to learn how to decipher man pages. Most scripters need to study an app's dictionary before they start scripting it. The difference is in degree not nature.


There are times when shell scripting is the best, shortest, most maintainable
method. It is available on every OS X using Mac as  it is supplied by Apple. By
the usual criteria, that makes it vanilla.

No. Not at all. AppleScript is a language and shell scripting is a language
that is not appleScript. "Do script", does not magically turn   shell,
python, usertalk, visual basic etc. into appleScript.

Again, using a shell command via do shell script does not require one to learn a language. It's nothing more than an osax call with a string parameter. Calling any handler with parameters is virtually the same thing without the osax. Is you want to say "Hello" to someone that speaks Spanish you only need to learn one word not the entire language.


If you need to write an Applescript to run in Terminal.app you'd best to become comfortable with "do script". If you want write an Applescript for Safari, better learn how to use "do javascript". Older versions of Microsoft Word - visual basic scripting. How about Panorama.app - "do script" again. Filemaker Pro has it's own internal script language which can be called from Applescript. These are all part of Applescript like it or not. I would have preferred they had actually implemented Applescript but they were too lazy to do so.

Novice scripters write for these apps just like experienced scripters do. To restrict discussion here to only what the list censors call Applescript terminology is a disservice to everyone though I do agree that Applescript should be the primary focus of any discussions. However, when a novice scripter is better served by pointing out that something could be better done by invoking a shell command or two via do shell script it suddenly becomes pertinent on this list.

I don't believe anyone here has ever advocated full fledged shell scripting (on the list) any more than they have Ruby, Python or Perl scripting (well maybe once or twice). Those discussions do belong on the MacScript list. Using do shell script from Applescript is a long way from full fledged shell scripting.

John
--
The Sufis advise us to speak only after our words have managed to pass through three gates.  At the first gate, we ask ouselves, 'Are these words true?'  If so, we let them pass on; if not, back they go.  At the second gate, we ask, 'Are they necessary?'  At the last gate, we ask, 'Are they kind?'  -Eknath Easwaran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
References: 
 >Re: Finding Filenames that contain a certain string (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Finding Filenames that contain a certain string
  • Next by Date: Re: Finding Filenames that contain a certain string
  • Previous by thread: Re: Finding Filenames that contain a certain string
  • Next by thread: Re: Finding Filenames that contain a certain string
  • Index(es):
    • Date
    • Thread