• 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: floating point idle delays, 'with timeout' and the date class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: floating point idle delays, 'with timeout' and the date class


  • Subject: Re: floating point idle delays, 'with timeout' and the date class
  • From: Graff <email@hidden>
  • Date: Sun, 14 Mar 2004 13:51:09 -0500

You can do this already. There is a constant called "minutes" which is defined as 60 seconds. There are also hours, days, weeks, and months. All of these are just constants and they resolve to the number of seconds that such a unit of time would hold. To use them you would do something like:

with timeout of 10 * minutes

I'm not sure when this was added but I know that it has been around since at least AppleScript 1.9.2

-Ken

On Mar 14, 2004, at 8:00 AM, Brennan wrote:

It's great that idle delays can now be set to floating point values -
especially in the range 0.1->1.0. I have already shaved many minutes off a
the total execution time of a script by using half seconds. Floating point
idle delays will of course become more useful as hardware speeds increase.

This leads me to consider the 'with timeout' control structure. Isn't
there some sense in being able to use values of less than one second there
also? Has this been implemented already?

(I'm not really sure how to test whether I can use fractions of a second,
which is why I am asking here).

Also, why can't we do stuff like

'with timeout of 10 minutes'

?

I know it's syntactical sugar, and it's just a matter of adding '*60' but
where 'seconds' is specified/required we *do* have a core level date class
after all. Why not use it?

Interestingly, the error message produced when attempting to compile the
above code is 'expected "second" or class name'. What class might be
appropriate here?

(I am writing scripts which export audio and video in batches - The time
taken to compress video, for example, is typically measured in minutes or
even hours, so it would be jolly convenient).
_______________________________________________
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.


  • Follow-Ups:
    • Re: floating point idle delays, 'with timeout' and the date class
      • From: Paul Berkowitz <email@hidden>
References: 
 >floating point idle delays, 'with timeout' and the date class (From: Brennan <email@hidden>)

  • Prev by Date: Re: What to do when strings don't match but should?
  • Next by Date: Re: finding newest file in a folder
  • Previous by thread: floating point idle delays, 'with timeout' and the date class
  • Next by thread: Re: floating point idle delays, 'with timeout' and the date class
  • Index(es):
    • Date
    • Thread