• 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 a file question - Mac OS 9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search a file question - Mac OS 9


  • Subject: Re: Search a file question - Mac OS 9
  • From: Ron Bishop <email@hidden>
  • Date: Wed, 18 Sep 2002 15:08:55 -0500

Charles-

If you want try the application Text-Edit Plus. It's free. It does OS 9 or X It does fantastic things with AppleScript IMHO. I love this application and would marry it if I could...

Here's a 5 minute script that you may be able to adapt - (plus in OS X you could use the GREP features of OS X)

set theNewDocument to ""

tell application "Tex-Edit Plus"

select window 1
set theLineCount to line count
set thisLine to 1
repeat theLineCount times
set theNewline to text of line thisLine of window 1
if theNewline does not contain "RC [0]" and theNewline contains "RC [someerror]" then
set theNewtext to theNewline
set theNewDocument to theNewDocument & theNewtext
end if
set thisLine to (thisLine + 1)
end repeat

activate
make new document
set text of document 1 to theNewDocument

end tell

Good Luck,
Ron Bishop


On Tuesday, September 17, 2002, at 12:24 PM, Charles Heizer wrote:

Hello,
I'm having some trouble getting a script to read a log file to work properly.

I'm trying to find any line that that contains "RC [someerror]" for example. Then write that line with it's line number out to a new text file. The thing is I don't want it to grab the lines that contain "RC [0]" because a return code of zero means there were no problems.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Search a file question - Mac OS 9 (From: Charles Heizer <email@hidden>)

  • Prev by Date: Re: Unicode to plain text
  • Next by Date: Re: Screen Capture Scriptable in 10.2
  • Previous by thread: Re: Search a file question - Mac OS 9
  • Next by thread: Re: Search a file question - Mac OS 9
  • Index(es):
    • Date
    • Thread