• 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: AppleScript for references
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript for references


  • Subject: Re: AppleScript for references
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 27 Dec 2011 02:24:27 -0600

On Dec 26, 2011, at 23:11, h. wrote:
I work a lot with references. In a manuscript, a reference can be introduced basically in two ways: in the form "Last-Name, 1999" or as "Last-Name (1999)" Every time I search a reference in a manuscript I have to search it in both ways so I have to delete the comma and put parentheses to the year over and over again. Basically I work checking references so I do that hundreds (perhaps thousands) of times (obviously for different names and years).

I need a script that eliminates coma and put in parentheses the year in a selected text. Does anyone know how?
______________________________________________________________________

Hello h.,

You don't mention which version of Word.  Neither do you give much context as to what you need to do with your searches, so it's not possible to see if you've boxed yourself in unnecessarily.

Word as I remember has pretty decent pattern matching, so you might be able to search for both at once:

 Find: Last-Name,? \(?1999\)?

If you must use Keyboard Maestro I hope you have KMv5.x which has the ability to search/replace the clipboard.


Something like this should be a bit speedier than what you were doing.

I'm guessing that 'Last-Name' is simply a placeholder for an alphabetic string without the dash.  If there are some special requirements then the regular _expression_ can be modified to suit.

You might also be able to add a 'return' keystroke to the end to automatically initiate the search.

--
Best Regards,
Chris

 _______________________________________________
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: 
 >AppleScript for references (From: "h." <email@hidden>)

  • Prev by Date: RE: AppleScript for references
  • Next by Date: Re: AppleScript for references
  • Previous by thread: Re: AppleScript for references
  • Next by thread: Another "Lion" difference? Finder says it moves but it actually copies
  • Index(es):
    • Date
    • Thread