[OS X TeX] OT: applescripting find/replace limitations

Jeffrey J Weimer weimerj at email.uah.edu
Tue May 15 22:34:30 CEST 2007


On May 15, 2007, at 1:57 PM, William Adams wrote:

> I'm trying to do some really basic find/replace operations in  
> TextEdit.app and am finding that past a certain complexity it just  
> doesn't work --- has anyone else experienced this?
>
> Although this works with only one pair of angle brackets, adding  
> the second in the replace field
>
> tell application "TextEdit" to activate
> tell application "System Events"
> 	tell process "TextEdit"
> 		tell window "Find"
> 			keystroke "(<@Italics>Slide "
> 			keystroke tab
> 			keystroke "(<@Italics>Slide<\\!s>"
> 			click button "Replace All"
> 		end tell
> 	end tell
> end tell
>
> doesn't work.
>
> Has anyone else ever experienced this? Would search-replacing be  
> more robust in TeXshop? Or would someone like to suggest some other  
> free tool? I'd like for this to be

I have had great luck in TextWrangler using Grep Find/Replace via  
AppleScript.

Unless I am mistaken, TeXShop has no AppleScript support for Find/ 
Replace.

Let me know if you need some help.

--
J. J. Weimer, Chemistry / Chemical & Materials Engineering
University of Alabama in Huntsville, MSB 125, 301 Sparkman Dr
Huntsville, AL 35899                phone: 256-824-6954



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list