RE: William Porter: renaming files in Finder
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