Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filemaker waiting for AS




On 02/03/2007, at 3:34 AM, Mirko Gude wrote:
@Malcolm: I have tried your advice, too. But filemaker or the finder didn't open the file.
Then the Loop from your routine starts, but the time runs out without opening the file. After this my seconds script starts and produce the error.

Good , then the script works. All you need to do is open the file.

I've never needed WaitUntilWindowExists to return a result because that's what I use WindowExists for. However, I've modified it. If it times out it returns the result of windowExists. You can use that as a test.

to WaitUntilWindowExists(win, n)
-- windows may take a while to populate, so we should wait for them, giving up after N seconds
set winExists to false
repeat n times
if my WindowExists(win) then return delay 1 -- enforce a delay
delay 1
end repeat
return WindowExists(win)
end WaitUntilWindowExists


to WindowExists(win)
	-- is the window there?
	tell application "Filemaker Pro"
		return name of every window contains win
	end tell
end WindowExists


malcolm

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Filemaker waiting for AS (From: "Mirko Gude" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.