• 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: William Porter: renaming files in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: William Porter: renaming files in Finder


  • Subject: RE: William Porter: renaming files in Finder
  • From: email@hidden
  • Date: Mon, 4 Feb 2002 15:13:38 EST

>I have not done much with AS before. I've got the book AppleScript for
>Applications by Ethan Wilde and I'm having trouble making the scripts work.
I'm
>using Mac OS X, v 10.1.2.

First, you need to add the modifier my before the handler name in the main
script, because it declares the handler as internal to the code.

on run
set myFolder to choose folder
my addprefix(item 1 of myFolder as alias)
end run

Second, I don't know if Jon's Commands are OS X capable [yet] (any comment,
Jon?), but I use that add-on for access to the renameFile command under OS
8.x - 9.2.1.

Third, I'm not sure that loop construction is valid. I'll leave that to
someone else, although I know that I would have broken it down into a couple
lines: one to get the number of items, and another for the loop (just for
clarity).

I won't be presumptuous, so I will also suggest opening the event and result
windows in the script editor when you run it, so you can see where it gets to
before it bogs. To help troubleshoot, consider putting in dialog boxes
(display dialog "Made it to the handler", display dialog "sucessfully reset
all the names", etc.), so you know where it gets to.

Best Wishes
=-= Marc


  • Follow-Ups:
    • RE: William Porter: renaming files in Finder
      • From: Jon Pugh <email@hidden>
  • Prev by Date: Palm Desktop: how to make a datebook entry or todo?
  • Next by Date: is Software Update scriptable under OSX?
  • Previous by thread: RE: Photoshop action scripts
  • Next by thread: RE: William Porter: renaming files in Finder
  • Index(es):
    • Date
    • Thread