• 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: Filemaker waiting for AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filemaker waiting for AS


  • Subject: Re: Filemaker waiting for AS
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Thu, 1 Mar 2007 08:38:10 +1100


On 01/03/2007, at 1:52 AM, Mirko Gude wrote:

Hi,

with a Filemaker DB (Version 5.5) I would like to open other FM files with a FilemakerScript that goes to an AS like this:

tell application "Finder"
open  file "xxxx"
end tell

After opening the file the same Filemaker DB should update some cells with AS, but it does not work: the Filemaker DB xxxx is not open (because it takes a few seconds). So the update runs into an error. I tried to stopp the AS with delay oder the FilemakerScript with wait Script, but it does not work. I put the two scripts into the script editor and it works fine, but in filemaker it will not.

Any ideas?


You might try something like this. I've found it to be pretty good. I find that passing the routine a generous number of seconds, like 120, is enough.



--
to WaitUntilWindowExists(win, n)
-- subject windows take a while to open, so we should wait for them, giving up after N seconds
set winExists to false
set counter to 0
repeat n times
if my WindowExists(win) then
delay 1 -- don't remove.
-- A deliberate pause after application creates window helps gives better results
return
else -- wait
set counter to counter + 1
delay 1
end if
end repeat
return
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:
Archives: http://lists.apple.com/archives/applescript-users

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

  • Prev by Date: Re: What's new in Leopard?
  • Next by Date: Re: [OT] AppleScripter's Salary
  • Previous by thread: Filemaker waiting for AS
  • Next by thread: FYI: Scripting Eudora To Make a New Mailbox
  • Index(es):
    • Date
    • Thread