Re: repeat while or delay
Re: repeat while or delay
- Subject: Re: repeat while or delay
- From: Robert Poland <email@hidden>
- Date: Thu, 26 Jan 2012 10:00:10 -0700
Thanks Yvan,
So far, it works well.
set numberOfWindows to count window open droppedItem as alias repeat 50 times if (count window) > numberOfWindows then exit repeat delay 0.1 end repeat
On Jan 26, 2012, at 8:33 AM, KOENIG Yvan wrote: Le 26 janv. 2012 à 15:25, Robert Poland a écrit : Hi,
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
TIA,
I use a slightly different version :
set droppedItem to "" & (path to desktop) & "4test.txt" tell application "TextEdit" set nbw to count windows open droppedItem --as alias -- as alias isn’t required by TextEdit repeat 50 times if (count windows) > nbw then exit repeat delay 0.1 end repeat if (count windows) = nbw then error "The app was unable to open :" & return & droppedItem end tell
Yvan KOENIG (VALLAURIS, France) jeudi 26 janvier 2012 16:31:06
Robert Poland - Fort Collins, CO
|
_______________________________________________
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