Re: Wildcard find/replace in Automator
- From: matt@xxxxxxxxxxx (matt neuburg)
- Date: Sun, 21 Aug 2005 16:59:55 GMT
nomis <ghostbrain@xxxxxxxxxxxxxxx> wrote:
> Anybody know if it's possible to do a wilcard search/replace in
> Automator? I'm trying to create an action that, among other things,
> strips the "(1 of 2)" that I get added to the end of multipart messages
> I download from usenet, but the problem is sometimes it's (1 of 3), or
> even worse, if the title is too long, all I get is "(1 of" or something
> equally abbreviated.
>
> I'd like to tell Automator "strip the first parenthesis and everything after".
>
> Anyone have thoughts how to do so?
One of the included Automator actions is a general AppleScript action
("Run AppleScript"), so you can just write this yourself:
on run {input, parameters}
set x to offset of "(" in input
if x > 0 then
return text from character 1 to character (x - 1) of input
end if
return input
end run
m.
--
matt neuburg, phd = matt@xxxxxxxxxxx, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/exec/obidos/ASIN/0596005571
Read TidBITS! It's free and smart. http://www.tidbits.com
.
- Follow-Ups:
- Re: Wildcard find/replace in Automator
- From: nomis
- Re: Wildcard find/replace in Automator
- References:
- Wildcard find/replace in Automator
- From: nomis
- Wildcard find/replace in Automator
- Prev by Date: Re: Filtering messages in MT-Newswatcher
- Next by Date: Re: Simple Sound-Trimming Software?
- Previous by thread: Wildcard find/replace in Automator
- Next by thread: Re: Wildcard find/replace in Automator
- Index(es):
Relevant Pages
|