• 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: Search/replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search/replace


  • Subject: Re: Search/replace
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 15 Mar 2008 12:07:53 -0400

On Sat, Mar 15, 2008 at 11:14 AM, Gini Waters <email@hidden> wrote:
> tell application "Microsoft Word"
>  my ReplaceEverywhere("<CN>", "@CT:")
> end tell

That's a call to a function ("handler") called "ReplaceEverywhere"
that you have to define elsewhere in your script...

> 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

I think you may have mistaken the command description syntax for the
actual AppleScript syntax.  Try this:

tell application "TextCommands"
    search text "This is a customer code: <CN>Chapter Number
<CT>Chapter Title." finding "<CT>" replacing with "@CT:"
end tell



>
> 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
>



--
Mark J. Reed <email@hidden>
 _______________________________________________
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

References: 
 >Search/replace (From: Gini Waters <email@hidden>)

  • Prev by Date: Re: File best practice questions
  • Next by Date: Re: Date math problem in Leopard
  • Previous by thread: Search/replace
  • Next by thread: Re: Search/replace
  • Index(es):
    • Date
    • Thread