• 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: shameless begging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shameless begging


  • Subject: Re: shameless begging
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 21 Sep 2006 07:50:26 -0700

On Sep 21, 2006, at 7:21 AM, Michelle Steiner wrote:

I think that this should do it for you; I didn't test it, though.

Nor did I remember to paste it into the message. *sigh*

Also, the script assumes that the first five characters of each line are unique; you may need to use a longer snippet of the line if this is not the case.

set source_file to choose file with prompt string "Choose the file to process." default location (path to desktop) without invisibles
set destination_folder to (choose folder with prompt string "Where should the output go?" default location (path to desktop) without invisibles) as text


set source_data to paragraphs of (read source_file)

repeat with this_line in source_data
	try
		set title to text 1 through 5 of this_line
	on error msg
		set title to this_line
	end try
	set file_name to destination_folder & title
	set file_ref to open for access file_name
	write this_line to file_ref
	close access file_ref
end repeat

-- Michelle

--
"Push to test." (click) "Release to detonate."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >iCal Script (From: "Jesse Almanrode - JA Computing" <email@hidden>)
 >shameless begging (From: Tom Burke <email@hidden>)
 >Re: shameless begging (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: List MOM, et al.
  • Next by Date: Re: AppleScript runs slow on Intel Mac's
  • Previous by thread: Re: shameless begging
  • Next by thread: Re: iCal Script
  • Index(es):
    • Date
    • Thread