• 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: scripts bumping into other scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripts bumping into other scripts


  • Subject: Re: scripts bumping into other scripts
  • From: David Ravetti <email@hidden>
  • Date: Fri, 21 Oct 2005 01:04:53 -0400

4. Sometimes, say with scripts activated by cron, one script will overrun its allotted time and attempt to run again while the previous instance is still active

Seems like a script with that problem is either running very often or taking a long time. If it's frequent and regular, why not use "on idle" and a stay-open script?

5. If two scripts try to tell the same application to do two different things at the same time (and nothing is done to stop one of them) the results will be unfortunate (and possibly make the scripter appear foolish in the eyes of his coworkers)

I can think of lots of workarounds for statement 5, but it seems to me I shouldn't have to. At the moment, I make sure to run all the scripts that use certain applications from one master script application that itself runs every few minutes (and only if System Events tells it that it isn't already running.) But I'd prefer to group my scripts by what they do, not by which application they happen to make use of to do it.

Depending on how many functions of a given app you're dealing with, it may make sense to write your own "with transaction" wrapper for the app - a single script that interacts with that application, basically passing through any incoming requests and passing back the results, but with a little added intelligence to queue the requests and avoid conflicts. Your other scripts, grouped however you prefer, would then communicate with this intermediary rather than directly with the application.

- Dave
 _______________________________________________
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

  • Follow-Ups:
    • Re: scripts bumping into other scripts
      • From: Richard Allaway <email@hidden>
  • Prev by Date: Re: Just returning Filename... not whole path
  • Next by Date: Re: decompilation insanity
  • Previous by thread: scripts bumping into other scripts
  • Next by thread: Re: scripts bumping into other scripts
  • Index(es):
    • Date
    • Thread