• 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: Last One - Replacing Chars of file name - I HATE TIDs.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Last One - Replacing Chars of file name - I HATE TIDs.


  • Subject: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 24 Aug 2001 19:42:40 -0700

On 8/24/01 7:24 PM, I wrote:

>> Ok, I'm giving up. I tried the following script in various versions and
>> it does nothing. No error, no nothing.
>
> It does almost everything.

And another thing:

if you were just wanting the script to return your altered text as a result,
then you have to ask it to do so. Otherwise the 'result' of the script is
just the result of your original last line last line:

set AppleScript's text item delimiters to oldTIDs
--> {""}

You'd have to add

theText

at the end to get the last changed name. To get _every_ changed name, you
have to make a list.

Before the repeat loop starts

set newNames to {}

and then, at the end of the repeat loop every time, do

set end of newNames to theText

which adds the newest name in the best, least memory-demanding way.

Finally, at the very end, after the repeat loop, you'd say:

newNames

and you'd get the complete list of new names as a list.
--
Paul Berkowitz


References: 
 >Last One - Replacing Chars of file name - I HATE TIDs. (From: "T.J. Mahaffey" <email@hidden>)

  • Prev by Date: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • Next by Date: Re: Script running the wrong application
  • Previous by thread: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • Next by thread: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • Index(es):
    • Date
    • Thread