Re: repeat while or delay
Re: repeat while or delay
- Subject: Re: repeat while or delay
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 26 Jan 2012 16:33:32 +0100
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
|
_______________________________________________
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