• 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: Photo List - again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Photo List - again


  • Subject: Re: Photo List - again
  • From: "AppleScripter" <email@hidden>
  • Date: Thu, 6 Sep 2001 09:52:26 -0500

> This is an example of what I have:
>
> Background Sky 00659.jpg
> Sunset 00660.jpg
> Clouds 00664.jpg
> Sunshine 00665.jpg
>
> This is an example of what I need:
>
> 00659.jpg Background Sky
> 00660.jpg Sunset
> 00664.jpg Clouds
> 00665.jpg Sunshine
>

This is completely untested since I am on a PC at work.

set inputFile to (choose file) --this would be the file containing the above
info
set outList to {} --to be used in a minute

set itemList to read file inputFile using delimiters return --this will give
you a list of items that are each line of the file

set {oldTIDs, text item delimiters} to {text item delimiters, " "} --TID
police

repeat with i in itemList
set theNames to text items of i --splits your line into two items
set outItem to (item 2 & " " & item 1) as text --transposes them
copy outItem to the end of outList --puts them in a new list
end

open for access file "outFile" with write permission
write outList to file "outFile" to eof
cose access file "outFile"

set text item delimiters to oldTIDs --TID police

HTH,

Greg Strange


References: 
 >Photo List - again (From: email@hidden)

  • Prev by Date: Re: Photo List - again
  • Next by Date: RE: QuarkXPress: intermittant xtags export problems
  • Previous by thread: Photo List - again
  • Next by thread: Re: Photo List - again
  • Index(es):
    • Date
    • Thread