• 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
Find out grep find string InDesign CS6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Find out grep find string InDesign CS6


  • Subject: Find out grep find string InDesign CS6
  • From: Bert Groeneveld <email@hidden>
  • Date: Sun, 30 Jun 2013 22:38:16 +0200

I need to find any sequence of 4 digits (that is inside an InDesign text frame) and replace it with another given number from a given list.
What I need to know is the found number so that I can pass that to my given list to get the replacement number. How can I do that? This is what I figured out so far:

tell application "Adobe InDesign CS6"
set find grep preferences to nothing
set change grep preferences to nothing
set myTextFrame to item 1 of selection -- I have a text frame selected that contains for instance "1234" among other text
set find what of find grep preferences to "[0-9]{4}"
set change to of change grep preferences to "other number"
-- set applied paragraph style of find grep preferences to "body"
tell myTextFrame
-- code to find out what the found number is
change grep -- this is the replace action, unfortunately I don't know what the number was that was replaced. I really need to know, because each found number has it's own corresponding replacement number from a given list.
end tell
end tell

Thanks in advance for any help.
Bert.
 _______________________________________________
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

  • Follow-Ups:
    • Re: Find out grep find string InDesign CS6
      • From: James Yanchak <email@hidden>
    • Re: Find out grep find string InDesign CS6
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Applescript to print Odd Pages only
  • Next by Date: Re: Find out grep find string InDesign CS6
  • Previous by thread: Re: Recursion Problem
  • Next by thread: Re: Find out grep find string InDesign CS6
  • Index(es):
    • Date
    • Thread