Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Re: Suppressing...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 28 of 28 Topic 1610 of 1643
Post > Topic >>

Re: Suppressing error messages -- Running!

by isw <isw@[EMAIL PROTECTED] > May 7, 2008 at 01:46 PM

In article <isw-3018AE.09242005052008@[EMAIL PROTECTED]
>,
 isw <isw@[EMAIL PROTECTED]
> wrote:

I had asked about suppressing the errors when I ran an AppleScript to do 
some text replacements in TextWrangler.

After a lot of poking around and a couple of clues from the TextWrangler 
mailing list, here's a snippet of a script that works. I thought others 
might like to see the exact syntax required:

--

tell application "TextWrangler"
   activate
   try
      replace " teaspoons " using " tsp. " searching in do***ent of text 
window 1 options {case sensitive:true, returning results:false} without 
saving
   end try
   try
      replace " Teaspoons " using " tsp. " searching in do***ent of text 
window 1 options {case sensitive:true, returning results:false} without 
saving
   end try

.... lather, rinse, repeat for all the other strings I want to change.

--

I never did figure out the proper syntax to get the "process lines 
containing" verb to work, but now that all the errors are suppressed 
(when a "replace" finds no target), I no longer need that list of "bait" 
strings to guarantee a hit, and so I no longer need to find and delete 
what remains of it after the script completes.

Thanks for the help; it encouraged me to keep looking for the answer.

Isaac
 




 28 Posts in Topic:
Suppressing error messages
isw <isw@[EMAIL PROTEC  2008-05-05 09:24:20 
Private Message
   2008-05-05 10:00:07 
Private Message
   2008-05-05 10:57:45 
Private Message
   2008-05-05 12:04:32 
Private Message
   2008-05-05 19:04:17 
Private Message
   2008-05-05 21:01:24 
Private Message
   2008-05-05 19:32:40 
Private Message
   2008-05-05 21:05:18 
Private Message
   2008-05-05 22:08:02 
Private Message
   2008-05-05 23:34:41 
Private Message
   2008-05-06 00:38:26 
Private Message
   2008-05-06 07:12:47 
Private Message
   2008-05-06 10:45:53 
Private Message
   2008-05-06 11:14:52 
Private Message
   2008-05-06 16:05:41 
Private Message
   2008-05-06 14:37:25 
Private Message
   2008-05-06 15:00:06 
Private Message
   2008-05-06 21:11:10 
Private Message
   2008-05-05 22:12:26 
Private Message
   2008-05-06 10:21:27 
Private Message
   2008-05-05 21:10:29 
Private Message
   2008-05-05 19:28:55 
Private Message
   2008-05-05 22:44:52 
Private Message
   2008-05-05 19:44:25 
Private Message
   2008-05-05 22:44:05 
Private Message
   2008-05-05 21:02:49 
Private Message
   2008-05-05 23:45:14 
Re: Suppressing error messages -- Running!
isw <isw@[EMAIL PROTEC  2008-05-07 13:46:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 21:26:03 CDT 2008.