On Tue, 22 May 2001, Roy McCoy <roy@LUNA.NL> wrote: >> set f to choose folder >> set l to MT List Files f of type "TEXT" name contains ".htm" return >> as alias with sub folders >> MT Change File Info l creator type "R*ch" > >It works for me too, thanks - also when I remove "of type "TEXT"", >which I think I have to do as some of the .html files don't seem to >have Macintosh file types. <shrug> That's your business. I added it to further narrow the chances of mistakenly getting some other sort of file (type) that coincidentally (however unlikely) may have the target string in its name. >> Using a Finder >> "whose"-type clause would be more precise (the following is all one >> line, assuming the first line of the preceding example): >> >> tell application "Finder" to set creator type of every file of entire >> contents of folder f whose file type is "TEXT" and name ends with >> ".htm" or name ends with ".html" to "R*ch" > >But then you supposably have "entire contents" problems again. I don't, but some people do. I prefer the speed of Tanaka's osax. >> >Yeah, that worked perfectly and took all of two seconds. I guess >>I'm a >> >masochist for trying to script it anyway, even figuring that the >>utility >> >would work. Thanks. >> >> Masochjst or Sadjst? > >I don't quite get you there Maybe there was nothing for you to get? <self-referentjal shrug> but if you or anyone has a Mac scripting >refresher course with practical examples to recommend, I'd appreciate >hearing about it. Trial & error, reading dictionaries, reading manuals, asking questions & thinking about answers... the usual problem-solving skills. Easy yakka, i.e. it takes time to save time? I'm hesitant to go plowing through the books I read >a couple of years ago (Tao, Goodman, Applied Mac Scripting), not only >because I'm lazy and don't have a lot of time, but also because I'm >afraid they've been outdated in some ways by changes in AppleScript. There have been only relatively minor (but sometimes significant) changes in AS with OS 8 & subsequent releases. For those I'd probably turn to Bill Cheeseman's AS Sourcebook website, or ask on this list. >I've been planning on going through the AppleScript Guidebook modules >I installed with 9.1, though I'm not sure how useful those are going >to turn out to be. One way to fjnd out. Selected from Ambrose Bierce's "Devil's Dictionary": PROJECTILE, n. -- The final arbiter in international disputes. Formerly these disputes were settled by physical contact of the disputants, with such simple arguments as the rudimentary logic of the times could supply -- the sword, the spear, and so forth. With the growth of prudence in military affairs the projectile came more and more into favor, and is now held in high esteem by the most courageous. Its capital defect is that it requires personal attendance at the point of propulsion. ------------------------------ End of MACSCRPT Digest - 20 May 2001 to 21 May 2001 (#2001-163) ***************************************************************
This archive was generated by hypermail 2b29 : Sun May 27 2001 - 12:00:29 AEST