• 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: Timing a Long Event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timing a Long Event


  • Subject: Re: Timing a Long Event
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 19 Apr 2010 16:47:47 +0100

Using an Ignoring application responses block + polling probably won't work for do shell script.

You could use the Bash & command to run your script in the background.
You can then put your AS code into a polling loop with a suitable delay to look for shell output to a file.

Alternatively you could use AppleScriptObjC which will give you access to NSTask and a NSRunLoop.
But it's a lot more complex.

Jonathan Mitchell

Developer
http://www.mugginsoft.com


On 19 Apr 2010, at 15:57, Marconi wrote:

> I'm trying to time an hours-long event using AS.
>
> I get the start time, perform the task, get the stop time, calculate the duration from start and stop times and post a dialog to say how long it took.
>
> But this always times out. I tried using a timeout of 12 hours but I still get a timeout error.
>
> The task is performed by a "do shell script" which offers no output until the task is done.
>
> Is there some way to do this timing as I am, wrapping the task in AS to note start and stop times, without it timing out?
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> 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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Timing a Long Event (From: Marconi <email@hidden>)

  • Prev by Date: Timing a Long Event
  • Next by Date: Re: Subroutine Question
  • Previous by thread: Timing a Long Event
  • Next by thread: Re: Timing a Long Event
  • Index(es):
    • Date
    • Thread