Search/replace
Search/replace
- Subject: Search/replace
- From: Gini Waters <email@hidden>
- Date: Sat, 15 Mar 2008 11:14:09 -0400
Hi all I'm am new to apple scripting. I'm not sure of the appropriate way to do this but I have a question. I'm trying to search and replace customer codes on a text file (usually Word) to my QuarkXPress tags. I've read a fair amount of posts, but haven't found the right example to build from.
--Here's what I'm working with:
<CN>Chapter 1 <CT>Is America at Risk? <CHO>Chapter Objectives After reading the chapter and
reflecting on the contents, you should be able to:
<NL>1.
Identify the concern for food safety and the presence of foodborne illness in
the United States. 2.
Articulate an understanding of the term "biotechnology" as it relates
to genetically modified food.</NL>
<KT>Key Terms agroterrorism—Includes purposeful adulteration/poisoning of
agricultural crops and the food supply to cause illness or death. biotechnology—Includes a gene slicing technique that enables scientists to insert genes into foods for the purpose of
dealing with the environmental stresses the world now poses. --I need to do Xpress tags that replace the <CN> with @CN: and also searches for bold or italic words and surrounds them with <B> or <I>. I thought it'd be a pretty straightforward script but am struggling. --I've found a few scripts that I thought might work, but don't....
tell application "Microsoft Word" my ReplaceEverywhere("<CN>", "@CT:") end tell
I wrote this: tell application "TextCommands" search text "This is a customer code: <CN>Chapter Number <CT>Chapter Title." [finding <CT>] replacing with "@CT:" end
The script didn't like the "<" character... Any suggestions you have would be greatly appreciated! Gini |
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden