• 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: Result too long for Event Log
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Result too long for Event Log


  • Subject: Re: Result too long for Event Log
  • From: Andy Wylie <email@hidden>
  • Date: Mon, 22 Jul 2002 21:05:15 +1200

on 22/7/02 7:44 AM +1200: Doug McNutt wrote:

> I seem to be able to read the contents of a 27 kB file but if I try to use the
> Event Log window for debugging I get a message that the result is too long to
> display and the script is forced to terminate. Error -20013 is mentioned in
> the event log but the real error shows up in a modal dialog first.
>
> I don't want to see the whole file as a result, but I do want the log as an
> aid to further development.
>
> Without the display "offset" searches seem to work at the 10 kB level into the
> file but I do see stack overflows when I get much beyond that.
>
you need to work with chunks like this droplet...

on open theFile
set |eof| to get eof of file theFile
open for access alias theFile
try
set startChunk to 1
set endChunk to 0
repeat until endChunk = |eof|
set endChunk to startChunk + 4024
if endChunk > |eof| then set endChunk to |eof|
set theText to read theFile from startChunk to endChunk
if (offset of "CalGray" in theText) > 0 then
display dialog "CalGray @ offset " & startChunk + (offset of
"CalGray" in theText)
exit repeat
end if
if startChunk > 1 then
set startChunk to endChunk - 10
else
set startChunk to endChunk
end if
end repeat
close access theFile
on error m number n
error {n, m}
close access theFile
end try
end open

> Script Editor 1.8.3, MacOS 9.2.1, Editor given 3 MB to work with.

-->This is known as monotony. <-- :)

getCoolEditor ( http://www.satimage-software.com/ )

"It is easy to teach anyone to play the maracas. Just grip the neck and
shake him in rhythm."

_____________________________ Andy
_______________________________________________
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: 
 >Result too long for Event Log (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Read using delimiter - does it work?
  • Next by Date: Re: Akua Sweets - list entries
  • Previous by thread: Result too long for Event Log
  • Next by thread: Re: Result too long for Event Log
  • Index(es):
    • Date
    • Thread