Re: Weeding out words
Re: Weeding out words
- Subject: Re: Weeding out words
- From: Matthew Smith <email@hidden>
- Date: Fri, 09 Feb 2007 14:42:19 +1100
- Thread-topic: Weeding out words
Title: Re: Weeding out words
On 09/02/2007 14:26, "Brett Conlon" <email@hidden> wrote:
My script later on adds the words "Collection" or "Box Set Collection" or "Season" or "Triple Pack" etc. When the user is prompted to enter the movie title's name, if they didn't just stick with the movie title and added the words "Box Set" or "boxset" or whatever, there would be double-ups in the file name later. The cleanup script trims any of these out first.
Here's what I ended up using. A big thanks to Matthew and Malcolm for offering their advice which helped me to get it working very nicely:
set TitleAns to "My Movie Title Special Box Set Boxset"
set Offenders to {"Special", "Edition", "SE", "Box Set", "Boxset", "Box", "Set"} -- words which need to be stripped if the user entered them by mistake.
Brett,
I am not sure why you have "Box Set" in there. It's two words.
What is going to happen if there is a title that actually contains those words? For example, a movie could be called Late Edition. Your code would change it to Late. I can think of several other possible titles where a word would be stripped.
--
Matthew Smith
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden