Re: Search a file question - Mac OS 9
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.