• 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: Scripting Console
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Console


  • Subject: Re: Scripting Console
  • From: Bernardo Hoehl / Gessos Rutenium <email@hidden>
  • Date: Wed, 22 Sep 2004 11:17:52 -0300

Reading the relevant parts of the log would be easiest with the help of the
shell and "tail" or using grep etc.

++++++++++++++++++++++++++++++++++++

Martin,

Thanks for posting.

My problem is that once I call:

do shell script "tail -f /var/log/mail.log"

It will display the result only when the process is finished. In this case: NEVER.

I understand that I could do a workaround like tail -1 /var/log/mail.log and repeat it continuously, check if the last-read line is equal to the present-read line, or even if the line contains relevant information for me. Could also "translate" the log results to a more understandable result in the GUI. But all my attempts looked awfull in the nib.

Please check this article:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSTask.html

I understand that this is the proper solution for my problem. This would create a subprocess with my process and unlock my app. But I am not ready for it.

Please forgive me if I did not understand what your meant on your last post.


Thanks again,


Bernardo

++++++++++++++++++++++++++++++++++


On 22 Sep, 2004, at 10:40 AM, Martin Orpen wrote:

on 22/9/04 2:31 pm, Bernardo Hoehl / Gessos Rutenium at email@hidden
wrote:

Why don't you just add another nib to your existing AppleScript Studio
app
and display the log contents in it?


I need to be able to add a NSTask class to my project. Unfortunately, I
am not ready for it. Don't know how.

If a generous soul could help me with an example AppleScript Studio
project, I could use. I would be extremely gratefull.

If you've got the Developer or Xcode Tools then you'll probably find what
you're looking for with the ManPage.nib of the Command Finder example:

<file:///Developer/Examples/AppleScript Studio/Command Finder/Command
Finder.pbproj>

Reading the relevant parts of the log would be easiest with the help of the
shell and "tail" or using grep etc.

--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Scripting Console (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Scripting Console
  • Next by Date: Re: specifying a new file (without "choose file name...")?
  • Previous by thread: Re: Scripting Console
  • Next by thread: Re: Scripting Console
  • Index(es):
    • Date
    • Thread