• 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: repeat while or delay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repeat while or delay


  • Subject: Re: repeat while or delay
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 26 Jan 2012 08:39:03 -0600

On Jan 26, 2012, at 8:25 AM, Robert Poland wrote:

Currently I'm using the following. Is there a way to make the delay more appropriate to the time it takes for a picture to load? 

A repeat while for example.

-- Script
tell application "GraphicConverter"
activate
open the droppedItem as alias
delay 1 -- need time
…
-- End Script

I am using this ...

tell application "Mail"
open msg
repeat 50 times -- wait for window of msg to appear
if exists window 1 then exit repeat
delay 0.1
end repeat
if not (exists window 1) then error "Mail is not responding. The message failed to open."
end tell

You may have to modify the exists lines to ask for a named document window. I use this in a script where I have closed all windows before opening the message.

 _______________________________________________
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: 
 >repeat while or delay (From: Robert Poland <email@hidden>)

  • Prev by Date: repeat while or delay
  • Next by Date: Re: repeat while or delay
  • Previous by thread: repeat while or delay
  • Next by thread: Re: repeat while or delay
  • Index(es):
    • Date
    • Thread