• 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: Script performance and Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script performance and Safari


  • Subject: Re: Script performance and Safari
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 13 Apr 2012 17:13:08 -0400

OK.

Looking at that pointed out a sore spot that I ignored in my past AS programming, the need to occasionally put in a delay and hope that the time delayed was sufficient for the condition to be fulfilled so that the next code will work.

This is inherently craptastic and sloppy, since we are not checking for the real condition to be satisfied before continuing.

So, my question/proposal is, how do we know that the thing we are talking to is in the right state to interact with if we are going to pull the delay?  What classes of things must be waited for and how can we check for them instead of resorting to slapping in a delay of an arbitrary amount?

If we are doing GUI scripting, how do we know if the right window is open and the controls have drawn?

In Chris's example, there is that .1 second delay after copy is selected from the GUI.  How would we know that that action is done and we are ready to proceed with the execution of the next like of code?

Also, I noticed that delay now appears to take a float value as a valid argument.  When did this start being legit?

Cheers,
- Alex
 _______________________________________________
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

  • Follow-Ups:
    • Re: Script performance and Safari
      • From: Axel Luttgens <email@hidden>
References: 
 >Script performance and Safari (From: Mark Ratledge <email@hidden>)
 >Re: Script performance and Safari (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Script performance and Safari
  • Next by Date: Speed Testing
  • Previous by thread: Re: Script performance and Safari
  • Next by thread: Re: Script performance and Safari
  • Index(es):
    • Date
    • Thread